Skip to content

Commit 1cd9a49

Browse files
committed
Update README.md
1 parent 5df7251 commit 1cd9a49

File tree

1 file changed

+36
-13
lines changed

1 file changed

+36
-13
lines changed

examples/python/README.md

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,61 @@
1-
# Running all tests from Selenium python example
1+
# Running tests from Selenium Python examples
22

3-
Follow these steps to run all test example from selenium python
4-
5-
1. Clone this repository
3+
#### 1. Clone this repository
64

75
```
86
git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git
97
```
108

11-
2. Navigate to `python` directory
9+
#### 2. Navigate to `python` directory
1210

1311
```
1412
cd seleniumhq.github.io/examples/python
1513
```
1614

17-
3. Install dependencies using pip
15+
#### 3. Create a virtual environment
16+
17+
- On Windows:
18+
19+
```
20+
py -m venv venv
21+
venv\Scripts\activate
22+
```
23+
24+
- On Linux/Mac:
25+
26+
```
27+
python3 -m venv venv
28+
source venv/bin/activate
29+
```
30+
31+
#### 4. Install dependencies:
1832

1933
```
2034
pip install -r requirements.txt
2135
```
22-
> if you are on a different python version, for example python3.x you may have to replace `pip` with `pip3`
2336

24-
4. Run all tests
37+
> for help, see: https://packaging.python.org/en/latest/tutorials/installing-packages
38+
39+
#### 5. Run tests
40+
41+
- Run all tests with the default Python interpreter:
2542

2643
```
2744
pytest
2845
```
2946

30-
> Please keep some patience - If you are doing it for the first time, it will take a little while to verify and download the browser drivers
47+
- Run all tests with every installed/supported Python interpreter:
3148

32-
## Execute a specific example
33-
To run a specific Selenium Python example, use the following command:
34-
```bash
49+
```
50+
tox
51+
```
52+
53+
> Please have some patience - If you are doing it for the first time, it will take a little while to download the browser drivers
54+
55+
- Run a specific example:
56+
57+
```
3558
pytest path/to/test_script.py
3659
```
3760

38-
Make sure to replace `path/to/test_script.py` with the path and name of the example you want to run.
61+
> Make sure to replace `path/to/test_script.py` with the path and name of the example you want to run

0 commit comments

Comments
 (0)