Test web application: https://www.instagram.com/
- To implement working project based on https://testautomationu.applitools.com/selenium-webdriver-python-tutorial/chapter1.html
- To build a basic Web UI test automation solution using Python and Selenium WebDriver
# Activate venv
souce env/bin/activate
# Install all dependencies in your virtualenv
pip install -r requirements.txt
# Paste your creds inside test/data/test_data.json
{
"config":
{
"browser": "Headless Chrome",
"implicit_wait": 10
}
,
"valid_user_data":
{
"login": "[email protected]",
"password": "password"
}
}
# Run all test cases
pytest -v
I have named test files based on functionality
test_login.py contains the next test cases:
1. test_basic_login
Steps:
- Open the main page
- Fill out username and password
- Click on "Log In" button
Excepted result:- Oppened home page
- Shown button bar
- On the center shown search bar
- Shown dialog "Save Your Login Info?"
2. test_login_invalid_data
Steps:
- Open the main page
- Fill out username and invalid password
- Click on "Log In" button
Excepted result:- Shown error message