I am trying to get the attribute value of an element by using I.grabAttributeFrom()
method but I always get undefined instead of the attribute value. My code is
Scenario('Smoketest', async (I) => {
const columnIndex = await I.grabAttributeFrom('//th[text()="Status"]', 'aria-colindex');
});
The element is like that
<th aria-colindex = "2">
"Status"
<span> ... </span>
</th>
And I am using testcafe in codeceptjs.