Codeception - Hit HREF without ID

We have a table of links, each with no separate id or css class.

XPath to fifth link down: (grabbed from Chrome Developer Tools - keep XPath)

//*[@id="table_1_"]/tbody/tr[5]/td[2]/a

      

Click command in my testCept.php file:

$ I-> press ('// * [@ id = "table_1 _"] / TBODY / tr [5] / Td [2] / a'); However with the error

Link or button by name or CSS or XPath '// * [@id = "table_1 _"] / tbody / tr [5] / td [2] / a' not found on the page.

+3


source to share


1 answer


I found that if I change accept.suite.yml to use WebDriver instead of PhpBrowser, this link actually works.



+2


source







All Articles