https://github.com/mfaisalkhatri/web-automation-playwright-java
This repository contains web automation testing example code with Playwright, Java and TestNG.
https://github.com/mfaisalkhatri/web-automation-playwright-java
example-project hacktoberfest learning-by-doing playwright playwright-java software-testing testing tutorial uitesting web-automation
Last synced: 10 months ago
JSON representation
This repository contains web automation testing example code with Playwright, Java and TestNG.
- Host: GitHub
- URL: https://github.com/mfaisalkhatri/web-automation-playwright-java
- Owner: mfaisalkhatri
- Created: 2023-09-03T12:58:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-27T05:50:23.000Z (over 1 year ago)
- Last Synced: 2024-10-12T03:26:02.303Z (over 1 year ago)
- Topics: example-project, hacktoberfest, learning-by-doing, playwright, playwright-java, software-testing, testing, tutorial, uitesting, web-automation
- Language: Java
- Homepage:
- Size: 69.3 KB
- Stars: 14
- Watchers: 3
- Forks: 7
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

## Don't forget to give a :star: to make the project popular.
## :question: What is this Repository about?
- This repo has example code for running Web Automation Tests using Playwright, Java and TestNG.
- Websites used for testing are
- [LambdaTest e-commerce Playground](https://ecommerce-playground.lambdatest.io/)
- [LambdaTest Selenium Playground](https://www.lambdatest.com/selenium-playground/)
- This repo uses `Maven` as build tool and `TestNG` testing framework to run the tests.
## Talking more about the Scenarios Covered in this project:
I have tried to answer the below questions by providing working code example in this repo:
1. How to run test on Chrome browser?
1. How to run test on Chrome browser in Headless mode?
1. How to run tests on Firefox browser?
1. How to run test on Firefox browser in Headless mode?
1. How to run test on Chrome/Firefox browser in Slow Motion?
1. How to run test on Edge browser?
1. How to perform browser navigation's?
1. How to get the Page Title?
1. How to get the Website URL?
1. How to type values in the text box?
1. How to set different window sizes?
1. How to double on a button?
1. How to use Page Object Model using Playwright Java?
1. How to perform browser navigation?
1. How to perform Mouse hover?
## How to run the Tests?
- There are 2 ways to run the tests, those are as follows:
### 1. TestNG:
- Right-Click on the `testng.xml` and
select `Run .../testng.xml`
### 2. Maven:
`mvn clean install -Dsuite-xml=testng.xml `
## :writing_hand: Blog Links
- [Playwright Java Tutorial: Web Automation Testing | Installation and Setup](https://medium.com/@iamfaisalkhatri/playwright-java-tutorial-web-automation-testing-installation-and-setup-545c9c7661c8)
- [Playwright Java Tutorial: Web Automation Testing | Writing and running tests on Chrome, Firefox and Edge browsers](https://medium.com/@iamfaisalkhatri/playwright-java-tutorial-web-automation-testing-writing-and-running-tests-on-chrome-firefox-and-d2446b9a69ce)
- [Playwright Java Tutorial: Web Automation Testing | How to perform browser navigation?](https://medium.com/@iamfaisalkhatri/playwright-java-tutorial-web-automation-testing-how-to-perform-browser-navigation-043f14af5c97)
- [Playwright Java Tutorial: Web Automation Testing | How to work with text fields?](https://medium.com/@iamfaisalkhatri/playwright-java-tutorial-web-automation-testing-how-to-work-with-text-fields-6cc9982ed7b2)
## :question: Need Assistance?
- Discuss your queries by writing to me @ `mohammadfaisalkhatri@gmail.com`
OR ping me on any of the social media sites using the below link:
- [Linktree](https://linktr.ee/faisalkhatri)
## :computer: Paid Trainings
- Contact me for Paid trainings related to Test Automation and Software Testing,
mail me @ `mohammadfaisalkhatri@gmail.com` or ping me on [LinkedIn](https://www.linkedin.com/in/faisalkhatri/)
## :thought_balloon: Checkout the blogs related to Testing written by me on the following links:
- [Medium Blogs](https://medium.com/@iamfaisalkhatri)
- [LambdaTest Blogs](https://www.lambdatest.com/blog/author/mfaisalkhatri/)
- [My Website](https://mfaisalkhatri.github.io)
### :bookmark: Checkout videos related to Software Testing and Test automation tools on [Testing Talks with Faisal Khatri](https://www.youtube.com/@faisalkhatriqa)