Join the Stack Overflow Community
Stack Overflow is a community of 6.9 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I'm using the example right from the README.md file here: https://github.com/SeleniumHQ/selenium/tree/master/javascript/node/selenium-webdriver

var webdriver = require('selenium-webdriver'),
    By = require('selenium-webdriver').By,
    until = require('selenium-webdriver').until;

var driver = new webdriver.Builder()
    .forBrowser('firefox')
    .build();

driver.get('http://www.google.com/ncr');
driver.findElement(By.name('q')).sendKeys('webdriver');
driver.findElement(By.name('btnG')).click();
driver.wait(until.titleIs('webdriver - Google Search'), 1000);
driver.quit();

No matter what I set the time (1000 in the example) it will not wait that amount of time. No error is returned.

share|improve this question

The second parameter is a timeout. It's the maximum time .wait will wait for the condition of the first parameter to be satisfied but it will stop waiting as soon as the condition is satisfied.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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