Framework Mode - First Selenium script
Folder Structure
selenium_project/ ├── tests/ │ └── test_first_script.py ├── pages/ │ └── home_page.py ├── utils/ │ └── driver_factory.py ├── config/ │ └── config.yaml └── requirements.txt
selenium_project/ ├── tests/ │ └── test_first_script.py ├── pages/ │ └── home_page.py ├── utils/ │ └── driver_factory.py ├── config/ │ └── config.yaml └── requirements.txt
driver_factory.py).home_page.py).test_first_script.py).config.yaml).Use a config.yaml file to store environment details such as:
Load this config in your driver factory and tests to keep code flexible and avoid hardcoding.
pytest with pytest-html plugin to generate readable HTML reports.Where would you add a new page object for the Login page in this framework structure?