Reputation: 923
I try a lot to set Timeout but it still uses the 300-second default timeout
const { Builder } = require('selenium-webdriver');
let driver = await new Builder()
.forBrowser('firefox')
.usingServer('http://selenium-server:4000/wd/hub')
.build();
const capabilities = await driver.getCapabilities();
capabilities['map_'].set('timeouts', { implicit: 0, pageLoad: 60000, script: 30000 });
await driver.get(url);
I also try driver.manage().timeouts()
but got error: driver.manage(...).timeouts is not a function
"selenium-webdriver": "^4.0.0"
Upvotes: 0
Views: 355
Reputation: 493
There is no stable version of selenium 4. At least I tried 4.0.0-alpha-6
and this version has a lot of problems.
Let's try 3.6.0
instead.
Then this worked:
driver.manage().timeouts().pageLoadTimeout(60000);
Upvotes: 2