When comparing webdriver-sync vs Testium, the Slant community recommends webdriver-sync for most people. In the question“What are the best Node.JS Selenium WebDriver client libraries / bindings?” webdriver-sync is ranked 3rd while Testium is ranked 7th. The most important reason people chose webdriver-sync is:
### webdriver-sync avoids this browser.get("http://foo.html", function() { browser.title(function(err, title) { assert.ok(~title.indexOf('foo title'), 'Wrong title!'); browser.elementById('i am a link', function(err, el) { browser.clickElement(el, function() { browser.eval("window.location.href", function(err, href) { assert.ok(~href.indexOf('foo title 2')); browser.quit(); }); }); }); }); }); ### in favor of this - completely synchronous API! No promises or callbacks needed: driver.get("http://foo.html"); title = driver.getTitle(); link = driver.findElement(By.id('i am a link')); link.click(); assert(driver.getCurrentUrl().indexOf('foo title 2') > -1); title.should.equal('foo title'); console.log(title); driver.quit();
Ranked in these QuestionsQuestion Ranking
Pros
Pro Synchronous. No promises or callbacks needed.
browser.get("http://foo.html", function() {
browser.title(function(err, title) {
assert.ok(~title.indexOf('foo title'), 'Wrong title!');
browser.elementById('i am a link', function(err, el) {
browser.clickElement(el, function() {
browser.eval("window.location.href", function(err, href) {
assert.ok(~href.indexOf('foo title 2'));
browser.quit();
});
});
});
});
});
in favor of this - completely synchronous API! No promises or callbacks needed:driver.get("http://foo.html");
title = driver.getTitle();
link = driver.findElement(By.id('i am a link'));
link.click();
assert(driver.getCurrentUrl().indexOf('foo title 2') > -1);
title.should.equal('foo title');
console.log(title);
driver.quit();
Pro Same API as Selenium Java
If you've used the Selenium API before, you won't have to learn a new API.
Cons
Con Difficult to install on Windows
Due to the dependencies for installing on Windows, the process can be tedious (Requires Python 2.7 and Visual Studio).
Con webdriver-http-sync only implements some of the Webdriver protocol methods
webdriver-http-sync is a synchronous HTTP implementation of the WebDriver protocol for Node.js. As of August 2015, the majority of the 97 WebDriver methods aren't yet implemented, for example "forward", "back" and "submit".
By comparison, WebdriveIO has implemented all JSONWire methods.