- This repo has example code for running Web Automation Tests using Playwright, Java and TestNG.
- Websites used for testing are
- This repo uses
Maven
as build tool andTestNG
testing framework to run the tests.
I have tried to answer the below questions by providing working code example in this repo:
- How to run test on Chrome browser?
- How to run test on Chrome browser in Headless mode?
- How to run tests on Firefox browser?
- How to run test on Firefox browser in Headless mode?
- How to run test on Chrome/Firefox browser in Slow Motion?
- How to run test on Edge browser?
- How to perform browser navigation's?
- How to get the Page Title?
- How to get the Website URL?
- How to type values in the text box?
- How to set different window sizes?
- How to double on a button?
- How to use Page Object Model using Playwright Java?
- How to perform browser navigation?
- How to perform Mouse hover?
-
There are 2 ways to run the tests, those are as follows:
- Right-Click on the
testng.xml
and selectRun .../testng.xml
`mvn clean install -Dsuite-xml=testng.xml `
- Right-Click on the
- Playwright Java Tutorial: Web Automation Testing | Installation and Setup
- Playwright Java Tutorial: Web Automation Testing | Writing and running tests on Chrome, Firefox and Edge browsers
- Playwright Java Tutorial: Web Automation Testing | How to perform browser navigation?
- Playwright Java Tutorial: Web Automation Testing | How to work with text fields?
- Discuss your queries by writing to me @
mohammadfaisalkhatri@gmail.com
OR ping me on any of the social media sites using the below link:
- Contact me for Paid trainings related to Test Automation and Software Testing,
mail me @
mohammadfaisalkhatri@gmail.com
or ping me on LinkedIn