Created
September 13, 2013 22:47
-
-
Save kbingman/6557064 to your computer and use it in GitHub Desktop.
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
var client = webdriverjs.remote({ | |
desiredCapabilities: { | |
browserName: browserName | |
}, | |
logLevel: 'silent' | |
}); | |
// Extensions to Webdriver | |
client.addCommand('loginAndPreview', function(callback) { | |
this.url('http://preview.mobify.com/') | |
.setValue('#id_url', baseURL) | |
.setValue('#id_site_folder', bundleURL) | |
.click('#authorize'); | |
}); | |
client.addCommand('openMobifiedURL', function(url, callback) { | |
// we need a bit of a timeout for some reason here... | |
this.url(url) | |
.waitFor('#x-root') | |
.pause(1000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment