Reputation: 53803
testfile.js
var webdriverio = require('webdriverio');
var options = {
desiredCapabilities: {
browserName: 'firefox'
}
};
webdriverio
.remote(options)
.init()
.url('http://localhost/proj/index.php')
.moveToObject('div.media') // Move to DIV
.timeouts('implicit',6000) // Wait...
.saveScreenshot('./snapshot1.png') // Take Screenshot
.end();
.timeouts
has no effect. The screenshot is taken almost instantly afer moveToObject, no matter which parameter I choose to call .timeouts(['scrip'|'implicit'|'page load'], ms).
with.
I get also the same result with the callback function:
.timeouts('implicit',6000).then(function(){
this.timeouts('implicit',6000)
}
Any suggestions?
Upvotes: 0
Views: 977
Reputation: 11234
To delay queue execution use pause
instead of timeouts
http://webdriver.io/api/utility/pause.html
Upvotes: 2