Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
167
rated 0 times [  173] [ 6]  / answers: 1 / hits: 17947  / 10 Years ago, thu, november 27, 2014, 12:00:00

I am trying to choose a tool for Javascript automation tests.



Until now I used Selenium WebDriver in Java with TestNG to build my tests, but I have been asked to search for JavaScript solution to write tests.



Of course the first thing on my mind was to move to WebDriverJs - it should be similar to my Java tests.



But, I also found another framework: WebdriverIO. I could not find anything that could be done with WebdriverIO that is not possible with WebDriverJs.



Please help me to understand the difference so I can choose the right framework for me.


More From » selenium

 Answers
19

WebdriverJS is another name for selenium-webdriver, the official Node.JS implementation of the JSONWire (WebDriver Wire) Protocol by the Selenium team.



WebdriverIO is an independent implementation of the JSON Wire Protocol by Christian Bromann (SO profile), who works at Sauce Labs, a provider of cloud-base cross-browser testing. WebdriverIO wraps its lower level requests into useful commands, with a concise syntax:



client
.url('http://google.com')
.setValue('#q','webdriver')
.click('#btnG')


The same test with selenium-webdriver is more complicated:



driver.get('http://www.google.com');
driver.findElement(webdriver.By.id('q')).sendKeys('webdriver');
driver.findElement(webdriver.By.id('btnG')).click();


There are at least seven Webdriver clients written in Node.JS.


[#68677] Tuesday, November 25, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
makaylahk

Total Points: 166
Total Questions: 94
Total Answers: 117

Location: Gabon
Member since Sat, Jul 25, 2020
4 Years ago
;