Protractor JAVA: Writing a simple script using Jprotractor jar file
January 30, 2023 2023-01-30 11:00Protractor JAVA: Writing a simple script using Jprotractor jar file
Protractor JAVA: Writing a simple script using Jprotractor jar file
Hi All,
Hope you are doing good.
In this blog i would like to walk through to write a simple program in Java to calculate sum of 2 numbers in Angular application:
- · Create a new project in eclipse editor
- · Add Selenium java client drivers to your project
- · Add above created Jprotractor jar file to your project
- · Create a package and create a class
- · Write a command to launch chrome driver as below: ·
-
System.setProperty(“webdriver.chrome.driver”, “C:\\Users\\uname\\Downloads\\chromedriver_win32\\chromedriver.exe”);WebDriver driver= new ChromeDriver();· Create an object to NgWebdriver a below:NgWebDriver nDriver= new NgWebDriver(driver);· Write webdriver commands using nDriver as shown in below code snippet:

NgBy.Modal, NgBy.buttonText(): we have 10-12 supported methods are there which you can get detailed information from the below link only https://github.com/sergueik/jProtractor
We will see how to write few more programs using this jar file in next tutorial
Related Posts
APPIUM architecture overview
January 30, 2023
90 views
APPIUM Limitations
January 30, 2023
84 views
APPIUM: Introduction to mobile testing and overview on mobile devices
January 30, 2023
91 views
Jenkins: What is Jenkins and its installation steps
January 30, 2023
70 views
WebDriver: Differences between findElement and findElements
January 30, 2023
73 views