Permalink
Browse files

Refactor learnboost example

  • Loading branch information...
tj committed Sep 7, 2010
1 parent 906690c commit 286e12c963f363ca5d5926a7994aafa6ba476b6c
Showing with 19 additions and 21 deletions.
  1. +19 −21 examples/learnboost.js
View
@@ -12,24 +12,22 @@ var browser = soda.createClient({
browser: 'firefox'
});
-browser.session(function(){
- browser
- .chain
- .open('/')
- .clickAndWait('css=input[value=Submit]')
- .click('Add Class')
- .type('classroom[name]', 'Me Iz In Your Webzite')
- .type('classroom[description]', 'Controlling urz Browzer')
- .click('classroom[startdate]')
- .click('//tr[3]/td[4]/div')
- .click('classroom[enddate]')
- .click('//tr[4]/td[4]/div')
- .click('//input[@value="Save"]')
- .clickAndWait('link=Log out')
- .testComplete()
- .done(function(err, res){
- if (err) throw err;
- console.log('done');
- });
-});
-
+browser
+ .chain
+ .session()
+ .open('/')
+ .clickAndWait('css=input[value=Submit]')
+ .click('Add Class')
+ .type('classroom[name]', 'Me Iz In Your Webzite')
+ .type('classroom[description]', 'Controlling urz Browzer')
+ .click('classroom[startdate]')
+ .click('//tr[3]/td[4]/div')
+ .click('classroom[enddate]')
+ .click('//tr[4]/td[4]/div')
+ .click('//input[@value="Save"]')
+ .clickAndWait('link=Log out')
+ .testComplete()
+ .done(function(err, res){
+ if (err) throw err;
+ console.log('done');
+ });

0 comments on commit 286e12c

Please sign in to comment.