Skip to content

Instantly share code, notes, and snippets.

@kbingman
Created September 13, 2013 22:47
Show Gist options
  • Save kbingman/6557064 to your computer and use it in GitHub Desktop.
Save kbingman/6557064 to your computer and use it in GitHub Desktop.
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