sebv/node-wd-sync

waitForElementByCss timeout value is ignored

davidmccabe opened this issue · 1 comments

First of all, thank you for making this wonderful module. Our tests are immensely nicer thanks to your efforts.

I notice that the timeout argument of waitForElementByCss is ignored; the browser's timeout is used instead. So this code will wait for 30 seconds, rather than 1 second, before throwing "Error: Element didn't appear":

    browser.setWaitTimeout(30*1000);
    browser.waitForElementByCss('#non-existent-element', 1000);
sebv commented

Yes, you need to choose what kind of timeout you want to use. browser.waitForElementByCss just pools on the client side, so it only work if the browser returns something in a timely manner.