I have a table with checkboxes in each row. The user can select some rows and delete them, also I have this "select all" checkbox. I want to test selecting and deleting two rows for example, also click select all and delete them. So I need to check the second and third checkboxes for the first test and first one for the second test...
I couldn't find a way to select the nth element, the only way I could find is selecting by xpath, so I tried this without luck:
$I->checkOption("(//input[@type='checkbox'])[2]");
The error is smt. like //html(//input[@type='checkbox'])[2] is invalid
.
Apparently codeception is modifying the selector, so I tried to use WebDriverBy class but I couldn't find a way to pass it as a parameter...
Any ideas?
PS: This is not the actual case but a simple example to describe the problem...