-
This repo has example code for running Web Automation Tests using Playwright, Java and TestNG.
-
Websites used for testing are
-
This repo uses
Mavenas build tool andTestNGtesting 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 handle single and multi-select dropdown fields?
- How to perform different mouse click actions?
- How to verify if an element is displayed, enabled, or selected?
-
There are 2 ways to run the tests, those are as follows:
- Right-Click on the
testng.xmland selectRun .../testng.xml
`mvn clean install -Dsuite-xml=testng.xml ` - Right-Click on the
- Web Automation Testing with Playwright Java: Installation and Set Up
- Writing and running tests on Chrome, Firefox, and Edge browsers with Playwright Java
- How to perform browser navigations with Playwright Java
- How to Work with Text Box in Playwright Java for Web Automation Testing
- [How to Handle Single and Multi-Select Dropdown Fields with Playwright Java] (https://medium.com/@iamfaisalkhatri/playwright-java-tutorial-web-automation-testing-how-to-handle-single-and-multi-select-dropdowns-426b65614e28)
- How to perform the Mouse Hover actions with Playwright Java for Web Automation Testing
- How to verify if an element is displayed, enabled, or selected, in Playwright Java
- Working with Data Tables with Playwright Java
- How to perform Mouse Click Actions using Playwright Java
- Discuss your queries by writing to me @
mohammadfaisalkhatri@gmail.comOR 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.comor ping me on LinkedIn