Last active
March 8, 2016 15:40
-
-
Save eyalzek/a97f11c9726f19cbbc10 to your computer and use it in GitHub Desktop.
webdriverio waitUntil bug example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// run with: `./node_modules/.bin/mocha --timeout 600000 example.js` | |
// considering you have mocha installed locally. | |
var webdriverio = require('webdriverio'), | |
mocha = require('mocha'), | |
client = {}; | |
client = webdriverio.remote( | |
{ | |
desiredCapabilities: {browserName: 'chrome'}, | |
logLevel: 'verbose' | |
} | |
); | |
describe('waitUntil not failing', function() { | |
before(function(done) { | |
client.init(done); | |
}); | |
it('should fail after reaching timeout', function() { | |
return client | |
.url('http://google.com') | |
.waitUntil(function() { | |
return this | |
.getTitle(function(err, title) { | |
return title !== 'Google'; | |
}); | |
}, 10000); | |
}); | |
after(function(done) { | |
client.end(done); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// console output:
$ ./node_modules/.bin/mocha --timeout 600000 untitled.js