Home > Protractor

Protractor: Script execution using custom command

This article will cover below points:  Use of custom command instead of protractor along with user defined options to control the execution of script. Protractor script execution for different test suites using different configuration files i.e. In regression test suite we will execute all spec files In smoke test suite we execute

This Article is TAGGED in , , , , , , . Read more

Code to perform Image comparison in protractor

To perform image comparison in GUI Testing we need to install protractor-image-comparison module it can be installed using below command. Open command prompt and run below command. [crayon-62ba2b11aa201780673016/] Add below code in onPrepare function of configuration file [crayon-62ba2b11aa206152565559/] Code to do image comparison [crayon-62ba2b11aa208002941464/] ImageName is image file name exist in baseline folder. If image is not

This Article is TAGGED in , . Read more

Protractor: How to read excel file in node.js? 

To read excel file in nodejs application we required exceljs to be installed. In protractor to read excel file, we need exceljs library along with node and protractor. Here are the steps to install exceljs library. Go to the folder location where you want to install exceljs library. Type npm install exceljs and press

This Article is TAGGED in , , , , . Read more

Simple protractor script

Code for sample protractor script: In protractor there are two basic files to execute any automation script. Those are configuration file and specification file. Configuration file contains all configuration related code. And specification file contains test scripts. Configuration file is one for the project and we can have any number

This Article is TAGGED in . Read more

How to install protractor and configure?

To configure protractor below are the steps: 1. Download eclipse from https://www.eclipse.org/downloads/ and install it. 2. Download node.js from https://nodejs.org/en/download/ and install it. 3. Open the command prompt and run below command. It will install protractor globally. “npm install -g protractor”. 4. Run below command in protractor to update webdriver. “webdriver-manager update“. 5. Start the selenium server by running

This Article is TAGGED in . Read more

Handling Popups using protractor

Identify or handle javascript popup/alert using protractor in automation. Javascript popup cannot be inspected. We don't get html for javascript popup. So we cannot find element and it is not possible to perform operation based on web element. There are different types of java script popups. Those are Simple alert, Confirmation

This Article is TAGGED in , , . Read more

Protractor: Add data in excel sheet using exceljs in node

Prerequisite:To perform write operation on excel sheet we need node application and exceljs library installed. Below is the code for different write action on excel file. Add sheet to new excel file [crayon-62ba2b11aae6b445564192/]   Add row in new sheet [crayon-62ba2b11aae71180549210/]   Edit Existing Excel File [crayon-62ba2b11aae75070019610/]  

This Article is TAGGED in , , , , . Read more

Read PDF File using Protractor

Pre-requisite: To read pdf file, first we need to install pdf2json library. Step to install pdf2json Prerequisite : System should have nodejs Installed. Open COMMAND prompt and go to directory . Write npm i pdf2json  and press enter. Once library is installed you will see below screen   Below is the code which shows how to read PDF

This Article is TAGGED in , , , , . Read more

Protractor is better than Selenium for Angular Applications.

The selection between selenium or protractor is based on what type of web application we are automating. If your application is angular based then it is feasible to select protractor. In this post you will learn why to use protractor for web based application. Protractor runs on top of selenium webdriver

This Article is TAGGED in , , . Read more

Advantages and disadvantages of protractor

Advantages of Protractor: Protractor runs on top of the selenium webdriver. Hence all the capabilities of webdriver are supported in protractor. It has extra locators compared to selenium webdriver those are model,repeater, binding etc. It has default waits which waits for angular which is not present in selenium webdriver. Easy to write and manage

This Article is TAGGED in . Read more