Created
March 21, 2011 21:29
-
-
Save marcuswestin/880254 to your computer and use it in GitHub Desktop.
Get started using Selenium with SauceLabs and NodeJS
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
require('soda').createSauceClient({ 'username': 'username-string', 'access-key': 'access-key-string', | |
'url': 'http://example.saucelabs.com/', 'max-duration': 300, | |
'os': 'Windows 2003', 'browser': 'firefox', 'browser-version': '3.6', | |
'name': 'This is an example test' }).chain.session() | |
.open('/') | |
.getTitle(function(title){ | |
require('assert').ok(~title.indexOf('Cross browser testing with Selenium - Sauce Labs'), 'Title did not include the query'); | |
}) | |
.testComplete() | |
.end(function(err){ | |
if (err) throw err; | |
console.log('done'); | |
}) | |
.on('command', function(cmd, args){ | |
console.log(' \x1b[33m\x1b[0m: ', cmd, args.join(', ')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment