<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?
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It only takes a minute to sign up.Sign up to join this community
The implementation of webdriverIo is slightly different from selenium.
$('table').$$('td') will check for direct child 'td under 'table', and as td is not a direct child it won't return anything.
$('table').$$(' td') (See if this works)
Space in 'CSS' is similar to // in xpath
Better raise issue with webdriver io