Permalink
Browse files

Added nested google example

  • Loading branch information...
1 parent 72fccb5 commit 906690c5e6e45cbc846c50c5849a13d73c80c79f @tj tj committed Sep 7, 2010
Showing with 28 additions and 15 deletions.
  1. +0 −15 examples/google.js
  2. +28 −0 examples/google.nested.js
View
15 examples/google.js
@@ -12,21 +12,6 @@ var browser = soda.createClient({
browser: 'firefox'
});
-// browser.session(function(err){
-// browser.open('/', function(err, res){
-// browser.type('q', 'Hello World', function(err, res){
-// browser.clickAndWait('btnG', function(err, res){
-// browser.assertTitle('Hello World - Google Search', function(err, res){
-// if (err) throw err;
-// browser.testComplete(function(err, res){
-// console.log('done');
-// });
-// });
-// });
-// });
-// });
-// });
-
browser
.chain
.session()
View
28 examples/google.nested.js
@@ -0,0 +1,28 @@
+
+/**
+ * Module dependencies.
+ */
+
+var soda = require('../index');
+
+var browser = soda.createClient({
+ host: 'localhost',
+ port: 4444,
+ url: 'http://www.google.com',
+ browser: 'firefox'
+});
+
+browser.session(function(err){
+ browser.open('/', function(err, res){
+ browser.type('q', 'Hello World', function(err, res){
+ browser.clickAndWait('btnG', function(err, res){
+ browser.assertTitle('Hello World - Google Search', function(err, res){
+ if (err) throw err;
+ browser.testComplete(function(err, res){
+ console.log('done');
+ });
+ });
+ });
+ });
+ });
+});

0 comments on commit 906690c

Please sign in to comment.