Permalink
Browse files

Getting ready to publish.

  • Loading branch information...
1 parent 8f9d1cd commit 0da7f6c0accc87a94d3afe02c124e7f7ab6b27ab @MattiSG committed Jul 26, 2012
Showing with 11 additions and 12 deletions.
  1. +2 −1 .gitignore
  2. +6 −6 README.md
  3. +3 −5 package.json
View
@@ -1,2 +1,3 @@
node_modules
-chromedriver.log
+npm_debug.log
+chromedriver.log
View
@@ -3,7 +3,7 @@ WebDriver Elements
The [wd](https://github.com/admc/wd#readme) module for Node is a good WebDriver controller. However, its API enforces the classical Node-style callbacks (i.e. pass a callback to each getter, needing to test its first argument for an error…). The dreaded pyramid of callback neural death awaits users.
-This module aims at providing an object-oriented, [promises](http://wiki.commonjs.org/wiki/Promises/A)-style abstraction over wd methods.
+This module aims at providing a [promises](http://wiki.commonjs.org/wiki/Promises/A)-style abstraction over wd methods.
The goal is to be able to chain methods and getters this way:
@@ -16,12 +16,12 @@ The goal is to be able to chain methods and getters this way:
element.use(remoteBrowser);
element.findByName('q')
- .then(element.fill('Toto'))
- .then(element.click)
+ .then(element.type('Toto'))
+ .then(element.submit)
.then(element.findById('zero_click_heading'))
- .then(element.matches('Meanings of Toto'))
- .then(function(matches) {
- assert(matches);
+ .then(element.get('value'))
+ .then(function(value) {
+ assert.equal(value, 'Meanings of Toto');
}).end(); // needed if we want to throw any exception found along the way instead of writing a specific catcher for it
}
View
@@ -1,7 +1,7 @@
{
"name": "wd-element",
"version": "0.0.1",
- "description": "An object-oriented wrapper around wd.",
+ "description": "A promises-oriented wrapper around wd.",
"keywords": "webdriver, selenium, object, promise, promises",
"homepage": "https://github.com/MattiSG/wd-element/",
"bugs": "https://github.com/MattiSG/wd-element/issues",
@@ -30,8 +30,6 @@
},
"devDependencies": {
"should": "0.6",
- "mocha": "1.2",
- "visionmedia-jscoverage": "1.0"
- },
- "private": true
+ "mocha": "1.2"
+ }
}

0 comments on commit 0da7f6c

Please sign in to comment.