Framework Mode - Reading test data from JSON
Folder Structure
selenium-python-project/ ├── tests/ │ ├── test_login.py │ └── test_checkout.py ├── pages/ │ ├── login_page.py │ └── checkout_page.py ├── data/ │ └── test_data.json ├── utils/ │ └── json_reader.py ├── config/ │ └── config.yaml ├── drivers/ │ └── chromedriver.exe └── requirements.txt
This structure keeps test data in the data/ folder as JSON files. Utility code to read JSON is in utils/json_reader.py. Tests use this data to run with different inputs.