Pages

What is Protractor ?

Introduction to Protractor?
Introduction to protractor
Protractor
  • Before going to learn protractor we will discuss the automation frameworks that came before protractor.
  • We have implemented automation frameworks like TestNG, cucumber, keyword driver, data-driven, etc.,. using selenium.
  • While implementing those frameworks we used locators like css,tagName,className,id,name, etc.,.
  • Normally, web applications (like javascript) built using HTML attributes like className, id, name, value, etc.,.by using these attributes we had implemented the earlier frameworks (TestNG, cucumber, etc.,.) using selenium locators.
  • But Angular web-based applications have some extra HTML attributes like ng-init,ng-model,ng-app,ng-controlling,ng-repeat,ng-show,ng-bind, etc.,.and which is not possible for the selenium locators to identify this kind of attributes.
  • In order to overcome this problem Protractor framework had introduced.
  • Protractor which is built on the top of the selenium can handle this kind of attributes.
Protractor:
  • protractor is an end to end testing framework for Angular JS based applications.
  • While most of the frameworks focus on conducting unit tests for Angular JS applications whereas Protractor focuses on testing the actual functionality of an application.
  • Protractor can also automate AngularJS and non-angularJS applications.
  • Protractor built on top of WebDriverJs and all features which are in selenium webdriver is supported by it and in addition to angular specific features
Architecture of Protractor:

Protractor Architecture
Architecture of Protractor
  • Protractor can be implemented by using any in below 3 frameworks:
  1. Jasmine
  2. Cucumber
  3. Mocha
  • By default, protractor uses Jasmine framework.
  • Protractor is a Node.js program and you will download protractor package using npm which comes with Node.js.
  • NodeJs:
  1. It is open-source server environment, which has all node-modules which will be used for a protractor.
  • Protractor is built on webDriverJs and webDriverJs built on webDriver.
  • WebDriverJs:
  1.  It is a javascript implementation of selenium and it uses selenium Json-Wire protocol to interact with the browser. 
  2. Protractor depends on WebDriverJs to interact with browser
Please comment below to feedback or ask questions.

No comments:

Post a Comment

Please comment below to feedback or ask questions.