Skip to content

Upgrades all around #3864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions examples/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

Run an [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py): (Default option: ``--chrome``)

```bash
```zsh
pytest my_first_test.py
```

Expand All @@ -31,15 +31,15 @@ pytest my_first_test.py

Here's one way of changing the browser to Firefox:

```bash
```zsh
pytest my_first_test.py --firefox
```

--------

Another [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py) for a web page that has lots of different HTML items:

```bash
```zsh
pytest test_demo_site.py
```

Expand All @@ -49,7 +49,7 @@ pytest test_demo_site.py

Run an example test in ``--demo`` mode: (highlight assertions)

```bash
```zsh
pytest test_swag_labs.py --demo
```

Expand All @@ -59,7 +59,7 @@ pytest test_swag_labs.py --demo

Run [test_coffee_cart.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_coffee_cart.py) to test the [Coffee Cart](https://seleniumbase.io/coffee/) app:

```bash
```zsh
pytest test_coffee_cart.py --demo
```

Expand All @@ -69,7 +69,7 @@ pytest test_coffee_cart.py --demo

Run a [Wordle-solver example](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/wordle_test.py):

```bash
```zsh
pytest wordle_test.py
```

Expand All @@ -79,15 +79,15 @@ pytest wordle_test.py

Run an example test in ``--headless`` mode: (invisible browser)

```bash
```zsh
pytest my_first_test.py --headless
```

--------

Run an [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_swag_labs.py) using Chrome's mobile device emulator: (default settings)

```bash
```zsh
pytest test_swag_labs.py --mobile
```

Expand All @@ -97,7 +97,7 @@ pytest test_swag_labs.py --mobile

Run an [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_xkcd.py) in ``--demo`` mode: (highlight assertions)

```bash
```zsh
pytest test_xkcd.py --demo
```

Expand All @@ -107,55 +107,55 @@ pytest test_xkcd.py --demo

Run a [test suite](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_suite.py) with verbose output: (see more details)

```bash
```zsh
pytest test_suite.py -v
```

--------

Run a test suite using multiple parallel processes (``-n=NUM``):

```bash
```zsh
pytest test_suite.py -n=8
```

--------

Run a [parameterized test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/parameterized_test.py): (Generates multiple tests from one)

```bash
```zsh
pytest parameterized_test.py -v
```

--------

Run a test suite and generate a SeleniumBase Dashboard:

```bash
```zsh
pytest test_suite.py --dashboard
```

--------

Run a test suite and generate a ``pytest`` report:

```bash
```zsh
pytest test_suite.py --html=report.html
```

--------

Run a [failing test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_fail.py): (See the ``latest_logs/`` folder for logs and screenshots)

```bash
```zsh
pytest test_fail.py
```

--------

Run a failing test that activates ``pdb`` debug mode on failure:

```bash
```zsh
pytest test_fail.py --pdb -s
```

Expand All @@ -165,39 +165,39 @@ pytest test_fail.py --pdb -s

Run a test suite that demonstrates the use of ``pytest`` markers:

```bash
```zsh
pytest -m marker_test_suite -v
```

--------

Run a test suite that reuses the browser session between tests:

```bash
```zsh
pytest test_suite.py --rs
```

--------

Run an [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/rate_limiting_test.py) demonstrating the ``rate_limited`` Python decorator:

```bash
```zsh
pytest rate_limiting_test.py
```

--------

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:

```bash
```zsh
pytest upload_file_test.py
```

--------

🎖️ **SeleniumBase Commander** is a GUI for ``pytest``:

```bash
```zsh
sbase gui
```

Expand All @@ -207,23 +207,23 @@ sbase gui

<b>SeleniumBase tests can also be run with ``pynose``:</b>

```bash
```zsh
pynose my_first_test.py
```

--------

Run an example test suite and generate a ``pynose`` test report:

```bash
```zsh
pynose test_suite.py --report --show-report
```

--------

Run an example test using a ``pynose`` configuration file:

```bash
```zsh
pynose my_first_test.py --config=example_config.cfg
```

Expand All @@ -241,7 +241,7 @@ If you just need to perform some quick website verification on various devices,

To make things easier, here's a **simple GUI program** that allows you to run a few example tests by pressing a button:

```bash
```zsh
python gui_test_runner.py
```

Expand Down
4 changes: 4 additions & 0 deletions examples/cdp_mode/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,10 @@ sb.cdp.wait_for_text_not_visible(text, selector="body", timeout=None)
sb.cdp.wait_for_element_visible(selector, timeout=None)
sb.cdp.wait_for_element_not_visible(selector, timeout=None)
sb.cdp.wait_for_element_absent(selector, timeout=None)
sb.cdp.wait_for_any_of_elements_visible(*args, **kwargs)
sb.cdp.wait_for_any_of_elements_present(*args, **kwargs)
sb.cdp.assert_any_of_elements_visible(*args, **kwargs)
sb.cdp.assert_any_of_elements_present(*args, **kwargs)
sb.cdp.assert_element(selector, timeout=None)
sb.cdp.assert_element_visible(selector, timeout=None)
sb.cdp.assert_element_present(selector, timeout=None)
Expand Down
Loading