Before running the test, ensure the following are installed and configured:
- Python 3.10.6
- Google Chrome browser
- ChromeDriver (compatible with your Chrome version) - install using:
brew install chromedriver --cask
- Selenium, Pytest, python-dotenv Python libraries
To install the required Python libraries, use the following command:
pip install -r requirements.txt
- Clone this repository.
- Navigate to the project directory.
- Edit the .env file to specify your ChromeDriver location.
To execute the test, use the following command:
pytest tests/test_twitch_search.py
- A screenshot will be saved in the project directory as
streamer_page.png
after the streamer page loads successfully.
tino_hw_2/
├── pages/ # Page objects for twitch
├── tests/
│ ├── test_twitch_search.py # Test case implementation
├── utils/
│ ├── browser_setup.py # Browser configuration setup
├── conftest.py # Entry point of pytest
├── README.md # Project documentation
├── requirements.txt # Python dependencies
└── .env # Files to set environments