This repository contains automated web testing scripts created using Python's Selenium WebDriver. It covers various scenarios such as form field input, table interactions, dynamic elements, and login functionality on different websites. The scripts aim to provide hands-on practice with web automation techniques using the Page Object Model (POM).
This project demonstrates various web testing scenarios automated with Selenium. The following operations are included:
- Form submission
- Table interaction
- Handling dynamic elements (buttons, alerts)
- Drag and drop, slider movements
- Positive and negative login tests
The repository showcases test scripts built for different websites, with an emphasis on applying the Page Object Model (POM) pattern for better code structure and maintainability.
- Python 3.x
- Selenium
- Chrome WebDriver Manager
- Google Chrome Browser
- Clone the repository:
git clone https://github.com/razvanalexuc/Selenium_Web_Testing_Practice.git
- Navigate to the project directory:
cd Selenium_Web_Testing_Practice
- Install the required dependencies:
pip install -r requirements.txt
The script in testpractice_blogspot.py
interacts with a demo site hosted at TestAutomationPractice:
- Filling out form fields (name, email, phone, address)
- Handling cookie banners
- Table interaction (HTML and pagination-based)
- Dynamic button interaction
- Handling alerts and prompt boxes
- Drag and drop elements and moving sliders
For a detailed example of these interactions, refer to the file testpractice_blogspot.py
.
In usv_page_object.py
, the script tests the login functionality for the USV Moodle site:
- Entering username and password
- Handling login actions
- Basic Page Object Model for login
For more details, see the file usv_page_object.py
.
The script in testautomation_page_object.py
handles login scenarios at PracticeTestAutomation. It contains:
- Positive test case: Valid login credentials
- Negative test cases: Invalid username and invalid password
- Assertion of error messages
For more details, refer to testautomation_page_object.py
.
To run the tests, execute the individual test files using Python:
python testpractice_blogspot.py
python usv_page_object.py
python testautomation_page_object.py