Using webdriver.io....
For
<table>
<tbody>
<td></td>
I can get all the td
elements with $$('td')
. But I can't with $('table').$$('td')
. Instead I have to do $('tbody').$$('td')
. Why is this? Or did I do something incorrectly?
The implementation of webdriverIo is slightly different from selenium.
In webdriverIO $('table').$$('td')
will check for direct child 'td under 'table', and as td is not a direct child it won't return anything.
instead, try:
$('table').$$(' td') (See if this works)
or
$$('table td')
Space in 'CSS' is similar to // in xpath
Better raise issue with webdriver io