When comparing selenium-webdriverjs vs WD.js, the Slant community recommends selenium-webdriverjs for most people. In the question“What are the best Node.JS Selenium WebDriver client libraries / bindings?” selenium-webdriverjs is ranked 4th while WD.js is ranked 8th. The most important reason people chose selenium-webdriverjs is:
The [documentation](http://selenium.googlecode.com/git/docs/api/javascript/index.html) covers all the modules (including browser-specific ones) and data types. It also includes a change log. There is also a [Wiki on GitHub](https://github.com/SeleniumHQ/selenium/wiki/WebDriverJs).
Ranked in these QuestionsQuestion Ranking
Pros
Pro Extensive documentation
The documentation covers all the modules (including browser-specific ones) and data types. It also includes a change log. There is also a Wiki on GitHub.
Pro Cleaner and more concise code than WebdriverJS
There is no need to pass the 'driver' instance around, and not as many parentheses.
Using WD.js
function login(username, password) {
return this
.waitForElementByCss('.loginForm', asserters.isDisplayed, seconds(explicit_wait))
.elementById('emailAddress').sendKeys(username)
.elementById('password').sendKeys(password)
.elementById('signInButton').click()
}
Using WebDriverJS
function login(driver, username, password) {
driver.wait(until.elementIsVisible(driver.findElement({css: '.loginForm'})), seconds(explicit_wait));
driver.findElement({id: 'emailAddress'}).sendKeys(username);
driver.findElement({id: 'password'}).sendKeys(password);
driver.findElement({id: 'signInButton'}).click();
}
Cons
Con Dropped by Intern
Intern v1 used WD.js, but they dropped it in favor of developing Leadfoot.
Con Less activity than WebdriverIO
WebdriverIO issues: 34 open, 507 closed. First release May 2012 at v0.6
WD.js issues: 18 open, 216 closed. First release: April 2011