Browse files

adding sauce testing files

  • Loading branch information...
1 parent 85f866a commit f077dbf82deff484975ce1f2d1e83acdaf551886 @dethe dethe committed Sep 24, 2013
Showing with 1,000,041 additions and 0 deletions.
  1. +41 −0 saucetesting/sample.js
  2. +1,000,000 −0 saucetesting/top-1m.csv
View
41 saucetesting/sample.js
@@ -0,0 +1,41 @@
+var webdriver = require('wd')
+ , assert = require('assert');
+
+var browser = webdriver.remote(
+ "ondemand.saucelabs.com"
+ , 80
+ , "dethe"
+ , "6b6df5e4-65b8-457d-9896-6dbf23c74e71"
+);
+
+browser.on('status', function(info){
+ console.log('\x1b[36m%s\x1b[0m', info);
+});
+
+browser.on('command', function(meth, path){
+ console.log(' > \x1b[33m%s\x1b[0m: %s', meth, path);
+});
+
+var desired = {
+ browserName: 'iphone'
+ , version: '5.0'
+ , platform: 'Mac 10.6'
+ , tags: ["examples"]
+ , name: "This is an example test"
+}
+
+browser.init(desired, function() {
+ browser.get("http://saucelabs.com/test/guinea-pig", function() {
+ browser.title(function(err, title) {
+ assert.ok(~title.indexOf('I am a page title - Sauce Labs'), 'Wrong title!');
+ browser.elementById('submit', function(err, el) {
+ browser.clickElement(el, function() {
+ browser.eval("window.location.href", function(err, href) {
+ assert.ok(~href.indexOf('guinea'), 'Wrong URL!');
+ browser.quit()
+ })
+ })
+ })
+ })
+ })
+})
View
1,000,000 saucetesting/top-1m.csv
1,000,000 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit f077dbf

Please sign in to comment.