Skip to content

Instantly share code, notes, and snippets.

@epall
Created April 14, 2011 21:56
Show Gist options
  • Save epall/920657 to your computer and use it in GitHub Desktop.
Save epall/920657 to your computer and use it in GitHub Desktop.
var soda = require('soda');
var browser = soda.createSauceClient({
'url': 'https://saucelabs.com/',
'os': 'Windows 2003',
'browser': 'firefox',
'idle-timeout': 10,
'browser-version': '3.6'});
browser
.chain
.session()
.addLocationStrategy("apf", "var apf = inWindow.apf; \n" +
"var found; \n" +
"try { \n" +
"found = apf.document.selectSingleNode(locator); \n" +
"} catch (e) {} \n" +
"if (found) \n" +
"return found; \n" +
"else \n" +
"return null;")
.open('/')
.click("apf=foo")
.testComplete()
.end(function(err){
if (err) throw err;
console.log('Passed!');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment