Project implemented in Selenium Python Webdriver using pytest.
This project contains end-to-end (E2E) tests for the process of purchasing an item from a store and submitting a form. It utilizes Selenium WebDriver for automating browser interactions and pytest for organizing and running tests.
Before running the project, make sure you have the following dependencies installed:
- Google Chrome -> version 113.0.5672.93
- Python -> possession required
- Selenium
- Pytest
- openpyxl
To install the required packages, type -> ' pip install -r requirements.txt ' in terminal
Clone this project to your local machine using the following command:
Of course, you can use also the integrated development environment
To run the tests, execute the following command:
- cd xx( path to the location of the entire project folder ) -> indication of the project site
- pip install -r requirements.txt -> installing the required packages
- python -m pytest --html=report.html -> for the execution of all tests with the generation of a report
- python -m pytest -k def -v -s -> def - the test you want to perform ( type - test_form_Submit.py / test_e2e.py )
- python -m pytest name.py -v -s -> execution of tests from the entire file ( name.py - the name of the file you want to execute )
If you would like to run a given test in a different browser ( Chrome or Firefox ) -> Chrome run automatic
- python -m pytest test_e2e.py --browser_name firefox
If you want to perform the test using data from exel:
uncomment the test you are interested in with test_formSubmit and comment out the running def get_data