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
If any test is moving too fast for your eyes to see what's going on, you can run it in **Demo Mode** by adding ``--demo`` on the command line, which pauses the browser briefly between actions, highlights page elements being acted on, and lets you know what test assertions are happening in real time:
223
+
🔵 If any test is moving too fast for your eyes to see what's going on, you can run it in **Demo Mode** by adding ``--demo`` on the command line, which pauses the browser briefly between actions, highlights page elements being acted on, and lets you know what test assertions are happening in real time:
224
224
225
225
```bash
226
226
pytest my_first_test.py --demo
227
227
```
228
228
229
-
You can override the default wait time by either updating [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py) or by using ``--demo-sleep={NUM}`` when using Demo Mode. (NOTE: If you use ``--demo-sleep={NUM}`` without using ``--demo``, nothing will happen.)
229
+
🔵 You can override the default wait time by either updating [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py) or by using ``--demo-sleep=NUM`` when using Demo Mode. (NOTE: If you use ``--demo-sleep=NUM`` without using ``--demo``, nothing will happen.)
<h3><imgsrc="https://seleniumbase.github.io/img/green_logo.png"title="SeleniumBase"width="32" /> How to retry failing tests automatically:</h3>
250
250
251
-
You can use ``--reruns=NUM`` to retry failing tests that many times. Use ``--reruns-delay=SECONDS`` to wait that many seconds between retries. Example:
251
+
<p>You can use <code>pytest --reruns=NUM</code> to retry failing tests that many times. Add <code>--reruns-delay=SECONDS</code> to wait that many seconds between retries. Example:</p>
To pause an active test that throws an exception or error, add ``--pdb -s``:
267
+
🔵 To pause an active test that throws an exception or error, (*and keep the browser window open while **Debug Mode** begins in the console*), add **``--pdb``** as a ``pytest`` option:
268
268
269
269
```bash
270
-
pytest my_first_test.py --pdb -s
270
+
pytest test_fail.py --pdb
271
271
```
272
272
273
-
The code above will leave your browser window open in case there's a failure. (pdb commands: 'c', 's', 'n' => continue, step, next).
273
+
🔵 To start tests in Debug Mode, add **``--trace``** as a ``pytest`` option:
0 commit comments