This article will cover below points:
Use of custom command instead of protractor along with user defined options to control the execution of script.
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.
Add below code in onPrepare function of configuration file
Code to do image comparison
ImageName is image file name exist in baseline folder. If image is not This Article is TAGGED in Image Comparison, Protractor. Read more
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 angular, Excel, exceljs, nodejs, Protractor. Read more
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 Protractor. Read more
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.
5. Start the selenium server by running This Article is TAGGED in Protractor. Read more
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
Add row in new sheet
Edit Existing Excel File
This Article is TAGGED in Automation, exceljs, nodejs, Protractor, Selenium. Read more
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 Automation tool, nodejs, pdf2json, Protractor, Selenium. Read more
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 Comparison, Protractor, Selenium. Read more
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 Protractor. Read more