Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thegreatbonnie/puppeteer-web-automation-javascript
Example code of end to end web automation testing using Puppeteer JavaScript
https://github.com/thegreatbonnie/puppeteer-web-automation-javascript
puppeteer test-automation testing testing-tools web-automation-testing
Last synced: about 1 month ago
JSON representation
Example code of end to end web automation testing using Puppeteer JavaScript
- Host: GitHub
- URL: https://github.com/thegreatbonnie/puppeteer-web-automation-javascript
- Owner: TheGreatBonnie
- Created: 2024-11-02T18:11:18.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-05T14:37:25.000Z (3 months ago)
- Last Synced: 2024-11-13T11:39:02.484Z (3 months ago)
- Topics: puppeteer, test-automation, testing, testing-tools, web-automation-testing
- Language: JavaScript
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Puppeteer Web Automation In JavaScript
In this Puppeteer web automation repo, the following use cases have been covered:- Automated testing of a form by navigating to a webpage.
- Controlling browser instances and pages for automated tests.
- Automated DOM manipulation and interaction with a webpage.
- Taking screenshots of a full page, a specific area, and generating a PDF of a webpage.
- Automated event handling on a web app.
- Automated testing using Puppeteer and Cloud Selenium Grid.# How To Run The Tests
**Step 1**: Clone the repository in your local machine by using the following command in the terminal
```
git clone https://github.com/TheGreatBonnie/Puppeteer-web-automation-javascript.git
```**Step 2**: Navigate to the root folder of the project and install all the dependencies using the following command
```
npm install
```**Step 3**: Get the LambdaTest User Name and Access Key by navigating to [LambdaTest Account Page](https://accounts.lambdatest.com/security). Then create an .env file in the root folder and add the LambdaTest User Name and Access Key to the file.
```
LT_USERNAME="Your username"
LT_ACCESS_KEY="Your access key"
```**Step 4**: Use the commands below to run the tests:
- Automated testing of a form by navigating to a webpage
```
npm test formTest.test.js
```
- Controlling browser instances and pages for automated tests```
npm test pageNavigationFunctions.test.js
```- Automated DOM manipulation and interaction with a webpage.
```
npm test domManipulationFunctions.test.js
```- Taking screenshots of a full page, a specific area, and generating a PDF of a webpage.
```
npm test screenshotAndPdfFunctions.test.js
```- Automated event handling on a web app.
```
npm test eventHandlingFunctions.test.js
```- Automated testing using Puppeteer and Cloud Selenium Grid.
```
npm test main.test.js
```
# Have feedback or need assistance?Feel free to fork the repo and contribute to make it better! Email to [email protected] for any queries or ping me on the following social media sites:
LinkedIn: [@thegreatbonnie](https://www.linkedin.com/in/thegreatbonnie/)
Twitter: [@The_GreatBonnie](https://x.com/The_GreatBonnie)