Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lexxx42/pytest-playwright
UI autotest using Pytest and Playwright
https://github.com/lexxx42/pytest-playwright
playwright pytest python qase
Last synced: 23 days ago
JSON representation
UI autotest using Pytest and Playwright
- Host: GitHub
- URL: https://github.com/lexxx42/pytest-playwright
- Owner: Lexxx42
- License: mit
- Created: 2023-02-21T17:33:05.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-22T17:45:52.000Z (almost 2 years ago)
- Last Synced: 2024-11-13T20:24:54.764Z (3 months ago)
- Topics: playwright, pytest, python, qase
- Language: Python
- Homepage:
- Size: 122 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pytest-playwright
---
## UI autotest using Pytest and Playwright
---
Tools used:
+ [Python 3.11.2](https://www.python.org/downloads/)
+ [requests 2.28.2](https://pypi.org/project/requests/)
+ [playwright 1.30.0](https://pypi.org/project/playwright/)
+ [pytest 7.2.1](https://pypi.org/project/pytest/)---
## How to use this project
1. Install [Google Chrome browser](https://www.google.com/chrome/)
2. Install requirements+ If you use Windows install requirements with the following command:
```
pip install -r requirements.txt
```+ If you use Linux install requirements with the following command:
```
+ pip3 install -r requirements.txt
```2. Registrate on Qase.io TMS (Test Management System)
+ [Modern TestOps platform](https://qase.io/)3. Create new project GoogleSearch
4. Create new suite Index Page
5. Test suite Index Page is a representation of the main Google page
+ [Google](https://www.google.com/)
6. Lets check that main search button have the text Google Search
+ Create test case in the Index Page suite
+ Use the following command to download new browsers:```
playwright install
```+ Use the following command to run autotests:
```
pytest .
```+ You can find the locator for the 1st test case on the index page
+ Use F12 button to open DevTools
+
+
+ We need to find locator for the button
+ CSS:
```
[data-ved="0ahUKEwj-7OLupaf9AhV4Q_EDHQPUDysQ4dUDCBA"]
```
+ XPATH:
```
//div[@class='FPdoLc lJ9FBc']//input[@name='btnK']
```
### Source: [Stepushchenko](https://habr.com/ru/post/714950/)