Using webdriver.io....



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?

1 Answer 1


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)


$$('table td')

Space in 'CSS' is similar to // in xpath

Better raise issue with webdriver io

  • $$('table td') worked
    – dman
    Commented Feb 25, 2020 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.