Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any advantage or Disadvantage Protractor Vs Selenium? [closed]

I am currently working on the WebApp which has Lot of Angular js... We started with Selenium WebDriver and the scripts works well scratch codes... But I am suggested that we need to use protractor instead of Selenium WebDriver. As far as both do the same job for me. The ONLY difference I found is that I don't want to wait explicitly to load the webpage..

Is there any other advantage or disadvantage in Protractor Vs Selenium WebDriver?

like image 676
ChanGan Avatar asked Apr 29 '16 06:04

ChanGan


People also ask

What is the difference between selenium and protractor?

Selenium can be used to automate any technology based application which needs a browser. Official website of Protractor says that:- Protractor is an end-to-end test framework for Angular and AngularJS applications. Protractor is designed specially for automating Angular applications.

Can I use selenium or protractor to automate angular applications?

So Selenium and Protractor both can be used to automate Angular Applications. If your application is an Angular application, you should try to use Protractor as It is designed specially for them. Although you are expert in Selenium-Java but you can not bound yourself within a technology.

What is the difference between protractor and WebDriver?

Talking in terms of Selenium WebDriver, Protractor is a wrapper developed on the top of webdriver.js, with added features and functionalities. To interact with browser, WebDriver uses the Selenium JSON-Wire-Protocol. WebDriver is also the official JavaScript implementation of Selenium. What makes Protractor more attractive?

Why protractor is the best tool for web testing?

It comes with a right mix of the power of NodeJS, Selenium WebDriver, Jasmine, Cucumber and Mocha – which makes it a preferred testing tool for web applications. Though Protractor is designed keeping in mind AngularJS applications, it performs with equal competence with non-AngularJS applications too.


1 Answers

Hi we can have a discussion over it but as far as selenium vs protractor goes:

SELENIUM

  1. Works great even if it's angular JS website, only we have to deal with synchronization issue. If you can handle then no disadvantage.
  2. Selenium is very rich in automation, i.e, it's in the market for years and very much evolved and its API is almost stable.
  3. It's in fact a defacto tool in the open source market for browser automation.
  4. You can work with selenium in almost every popular language.

PROTRACTOR

  1. Is marketed as angular based automation tool. But when you would look at its core it's wrapper for webdriver JS. Hence it does not uncover any new vertical in browser automation.
  2. Yes it has certain advantage in case of angular specific locator strategy. It provides more option to work with Angular directives (i.e angular specific locator strategy).
  3. It's only available for only one client (language) i.e for JavaScript only. So to work with it you must know JavaScript.
  4. New in the market although its based on the webdriverJs.

So it totally depends upon your project requirement and team knowledge which tool you want to use. It will not be good to say which has what advantage over other. Both tools are here to help us and make browser automation flawless. Hope this helps.

like image 111
eduliant Avatar answered Oct 02 '22 13:10

eduliant