wd icon indicating copy to clipboard operation
wd copied to clipboard

Make waitForElementByXXX available into element context

Open stefanoverna opened this issue 11 years ago • 3 comments

I'd like to be able to use a waitForElementByXXX method to retrieve a subelement with a certain assertion.

browser
.elementByCssSelector('.foo')
.waitForElementByCssSelector('.bar', wd.asserters.isDisplayed)

Unfortunately, the above example will select the first .bar present in the page, not only the one within the .foo element.

It seem a fairly trivial need, is there some way to achieve it? Am I missing something? Let me know if you need more infos, and thanks for your work!

stefanoverna avatar Nov 27 '14 09:11 stefanoverna

try .waitForElementByCssSelector('>','.bar', wd.asserters.isDisplayed)

sebv avatar Nov 27 '14 10:11 sebv

Actually for waitForElement maybe is has never been implemented.

sebv avatar Nov 27 '14 10:11 sebv

@sebv yeah, it seems from the code that it has not been implemented :/

stefanoverna avatar Nov 27 '14 11:11 stefanoverna