Created
January 23, 2013 16:32
-
-
Save davidcornu/4609267 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
webdriver = require("wd") | |
browser = null | |
desired = | |
browserName: 'chrome' | |
platform: 'Windows 2008' | |
exports.init = (callback) -> | |
return callback(null, browser) if browser | |
console.log "initializing browser... " | |
driver = webdriver.remote "ondemand.saucelabs.com", 80, | |
process.env.BUSPLATFORM_SAUCELABS_USERNAME, | |
process.env.BUSPLATFORM_SAUCELABS_SECRET_KEY | |
driver.init desired, (err) -> | |
return callback(err) if err | |
browser = driver | |
callback(null, browser) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment