|
1 | | -# QA-Practice-Playwright-Automation |
2 | | -Automation testing scripts for the QA Practice website using Playwright. This repository demonstrates various automation testing scenarios, including form handling, navigation, assertions, and more. |
| 1 | +# QA Practice Playwright Automation |
| 2 | + |
| 3 | +## Project Overview |
| 4 | +This repository contains automation test scripts written using [Playwright](https://playwright.dev/) to test various functionalities on the `https://qa-practice.netlify.app/` website. The project demonstrates end-to-end testing capabilities, covering different scenarios such as alerts, dropdowns, file uploads, tables, etc. |
| 5 | + |
| 6 | +## File Structure |
| 7 | +``` |
| 8 | +QA-Practice-Playwright-Automation/ |
| 9 | +├── pages/ |
| 10 | +│ ├── LoginPage.js |
| 11 | +│ ├── RecoverPasswordPage.js |
| 12 | +│ ├── RegisterPage.js |
| 13 | +├── test-results/ |
| 14 | +│ ├── playwright-report/ |
| 15 | +├── tests/ |
| 16 | +│ ├── Alerts/ |
| 17 | +│ │ ├── Alert.spec.js |
| 18 | +│ │ ├── BtnActions.spec.js |
| 19 | +│ │ ├── DoubleClickBtn.spec.js |
| 20 | +│ │ ├── MouseHover.spec.js |
| 21 | +│ │ ├── Scrolling.spec.js |
| 22 | +│ │ ├── ShowHideElement.spec.js |
| 23 | +│ ├── Buttons/ |
| 24 | +│ │ ├── Checkbox.spec.js |
| 25 | +│ │ ├── RadioButtons.spec.js |
| 26 | +│ ├── Date Picker/ |
| 27 | +│ │ ├── DatePickers.spec.js |
| 28 | +│ ├── Dropdowns/ |
| 29 | +│ │ ├── Dropdown.spec.js |
| 30 | +│ ├── File Upload/ |
| 31 | +│ │ ├── FileUpload.spec.js |
| 32 | +│ │ ├── Solar_system.png |
| 33 | +│ ├── Forms/ |
| 34 | +│ │ ├── Login.spec.js |
| 35 | +│ │ ├── RecoverPassword.spec.js |
| 36 | +│ │ ├── Register.spec.js |
| 37 | +│ ├── Iframes/ |
| 38 | +│ │ ├── Iframes.spec.js |
| 39 | +│ ├── Loader/ |
| 40 | +│ │ ├── Loader.spec.js |
| 41 | +│ ├── New Tab or Window/ |
| 42 | +│ │ ├── NewBrowserTab.spec.js |
| 43 | +│ │ ├── NewBrowserWindow.spec.js |
| 44 | +│ ├── Pagination/ |
| 45 | +│ │ ├── Pagination.spec.js |
| 46 | +│ ├── Tables/ |
| 47 | +│ ├── DynamicTable.spec.js |
| 48 | +│ ├── StaticTable.spec.js |
| 49 | +├── .gitignore |
| 50 | +├── LICENSE |
| 51 | +├── package.json |
| 52 | +├── package-lock.json |
| 53 | +├── playwright.config.js |
| 54 | +``` |
| 55 | + |
| 56 | +## Features Covered |
| 57 | +The scripts are organized into categories for easy navigation and maintenance: |
| 58 | + |
| 59 | +- **Alerts**: Handle and validate alert dialogs, button actions, and mouse events. |
| 60 | +- **Buttons**: Test interactions with checkboxes and radio buttons. |
| 61 | +- **Date Pickers**: Validate date selection functionality. |
| 62 | +- **Dropdowns**: Verify dropdown menu options. |
| 63 | +- **File Upload**: Test the file upload functionality with various file types. |
| 64 | +- **Forms**: Cover login, registration, and password recovery scenarios. |
| 65 | +- **Iframes**: Interact with iframe elements. |
| 66 | +- **Loader**: Validate the appearance of loaders. |
| 67 | +- **New Tab or Window**: Test navigation to new tabs or windows. |
| 68 | +- **Pagination**: Verify pagination functionality. |
| 69 | +- **Tables**: Interact with dynamic and static tables. |
| 70 | + |
| 71 | +## How to Use This Repository |
| 72 | + |
| 73 | +### Prerequisites |
| 74 | +1. Install [Node.js](https://nodejs.org/) (ensure it is version 16 or higher). |
| 75 | +2. Install a package manager such as npm or yarn. |
| 76 | + |
| 77 | +### Setup |
| 78 | +1. Clone the repository: |
| 79 | + ```bash |
| 80 | + git clone <repository-url> |
| 81 | + ``` |
| 82 | +2. Navigate to the project directory: |
| 83 | + ```bash |
| 84 | + cd QA-Practice-Playwright-Automation |
| 85 | + ``` |
| 86 | +3. Install dependencies: |
| 87 | + ```bash |
| 88 | + npm install |
| 89 | + ``` |
| 90 | + |
| 91 | +### Running Tests |
| 92 | +1. Run all tests: |
| 93 | + ```bash |
| 94 | + npx playwright test |
| 95 | + ``` |
| 96 | +2. Run a specific test file: |
| 97 | + ```bash |
| 98 | + npx playwright test tests/<category>/<file>.spec.js |
| 99 | + ``` |
| 100 | +3. View the test report: |
| 101 | + ```bash |
| 102 | + npx playwright show-report |
| 103 | + ``` |
| 104 | + |
| 105 | +### Customize Configurations |
| 106 | +Modify the `playwright.config.js` file to change settings such as browser type, test directory, timeout, or parallel execution. |
| 107 | + |
| 108 | +## Contributions |
| 109 | +Feel free to contribute by creating pull requests for any bug fixes or new features. Ensure your code follows the project's style and is well-documented. |
| 110 | + |
| 111 | +## License |
| 112 | +This project is licensed under the [MIT License](LICENSE). |
| 113 | + |
| 114 | +--- |
| 115 | + |
| 116 | +If you encounter any issues or have suggestions for improvements, please open an issue in the repository. |
| 117 | + |
| 118 | + |
0 commit comments