This is a code created to run tests on headless browsers using Python and Selenium, that was the goal of my LambdaTest Blog Article: How to Run Headless Browser in Selenium Python: A Detailed Python Headless Browser Tutorial
As a prerequisite for this code, you need:
- Download and Install Python
- Install pytest, and Selenium WebDriver libraries
pip install -r requirements.txt- Download and Install Visual Studio Code
- Configure Pytest in Visual Studio Code
In order to run this code, please run the command below in the project folder:
pytestIn order to run the code of one specific file, please run the command below, just changing the name of the pýthon file you want to run:
pytest test_headless-1.py