You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h4align="center">Better web testing with <ahref="https://www.selenium.dev/documentation/"target="_blank">Selenium</a> and <ahref="https://docs.pytest.org/en/stable/"target="_blank">pytest</a>.</h4>
10
+
<h4align="center">Modern Web Testing with <ahref="https://www.selenium.dev/documentation/"target="_blank">Selenium</a> and <ahref="https://docs.pytest.org/en/stable/"target="_blank">Pytest</a>.</h4>
<palign="left"><b>One of many examples:</b> <ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py">test_demo_site.py</a></p>
48
+
<palign="left">An example test using the <code>BaseCase</code> class:</p>
<palign="left">An example of running a test: <ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py">test_demo_site.py</a></p>
Run a [Wordle-solver example](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/wordle_test.py):
41
47
42
48
```bash
43
49
pytest wordle_test.py
@@ -51,35 +57,27 @@ Run an example test in Headless Mode: (invisible browser)
51
57
pytest my_first_test.py --headless
52
58
```
53
59
54
-
Run an example test using Chrome's mobile device emulator: (default settings)
60
+
Run an [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_swag_labs.py) using Chrome's mobile device emulator: (default settings)
55
61
56
62
```bash
57
63
pytest test_swag_labs.py --mobile
58
64
```
59
65
60
66
<imgsrc="https://seleniumbase.io/cdn/gif/swag_mobile_2.gif"title="SeleniumBase Mobile Mode" /><br />
61
67
62
-
Run tests with verbose output: (includes more details)
68
+
Run a [test suite](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_suite.py)with verbose output: (see more details)
63
69
64
70
```bash
65
71
pytest test_suite.py -v
66
72
```
67
73
68
-
Run a test on the Demo Site to try many SeleniumBase methods:
Run a test suite multi-threaded using [n] threads:
77
75
78
76
```bash
79
77
pytest test_suite.py -n=4
80
78
```
81
79
82
-
Run a parameterized test: (Generates multiple tests from one)
80
+
Run a [parameterized test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/parameterized_test.py): (Generates multiple tests from one)
83
81
84
82
```bash
85
83
pytest parameterized_test.py -v
@@ -97,7 +95,7 @@ Run a test suite and generate a pytest report:
97
95
pytest test_suite.py --html=report.html
98
96
```
99
97
100
-
Run a failing test: (See the ``latest_logs/`` folder for logs and screenshots)
98
+
Run a [failing test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_fail.py): (See the ``latest_logs/`` folder for logs and screenshots)
101
99
102
100
```bash
103
101
pytest test_fail.py
@@ -109,25 +107,25 @@ Run a failing test with Debug-mode enabled: (``pdb`` activates on failures)
109
107
pytest test_fail.py --pdb -s
110
108
```
111
109
112
-
Run an example test suite that demonstrates the use of pytest markers:
110
+
Run a test suite that demonstrates the use of pytest markers:
113
111
114
112
```bash
115
113
pytest -m marker_test_suite -v
116
114
```
117
115
118
-
Run an example test suite that reuses the browser session between tests:
116
+
Run a test suite that reuses the browser session between tests:
119
117
120
118
```bash
121
119
pytest test_suite.py --reuse-session
122
120
```
123
121
124
-
Run an example test demonstrating the ``rate_limited`` Python decorator:
122
+
Run an [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/rate_limiting_test.py) demonstrating the ``rate_limited`` Python decorator:
125
123
126
124
```bash
127
125
pytest rate_limiting_test.py
128
126
```
129
127
130
-
Run an example test that demonstrates how to upload a file to a website:
128
+
Run an [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/upload_file_test.py) that demonstrates how to upload a file to a website:
0 commit comments