This is an example testing framework which I have built during my learning journey to present the automation skills using Python with Selenium WebDriver. The tests are meant to cover various functionalities of automationpractice.com website.
The project is structured as follows:
- base - contains the basepage that is inherited by other pages and also Selenium WebDriver calls
- pages - contains methods for user interactions on a given page along with locators
- tests - contains tests (more of them to come!)
- utilities - contains useful ways to improve the interaction (eg. logging functionaity)
There are also two other local directories which I do not publish on github:
- logs - contains log files
- reports - contains report files that are used for allure reporting
-
Framework supports all the available locator types: id, name, xpath, css selector, class name and link text.
-
The framework is based on page object model
- Default test runner is pytest
- Selenium methods are wrapped in a reusable way
- Log files take today's date in the file name
- Content of the log file shows detailed info about what is going on in the test according to the debug level
- Allure reports can be generated
- Screenshots are taken automatically if the test fails
- Further improvement of selenium wrappers
- Data driven tests
- More tests