Skip to content

Commit 97e430c

Browse files
committed
Update the docs
1 parent be3fc3a commit 97e430c

File tree

18 files changed

+163
-112
lines changed

18 files changed

+163
-112
lines changed

README.md

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<meta property="og:image" content="https://seleniumbase.io/cdn/img/mac_sb_logo_5.png" />
66
<link rel="icon" href="https://seleniumbase.io/img/green_logo.png" />
77

8-
<h3 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/mac_sb_logo_3.png" alt="SeleniumBase" title="SeleniumBase" width="310" /></a></h3>
8+
<h3 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/sb_logo_10t.png" alt="SeleniumBase" title="SeleniumBase" width="270" /></a></h3>
99
<!-- View on GitHub -->
10-
<h4 align="center">Better web testing with <a href="https://www.selenium.dev/documentation/" target="_blank">Selenium</a> and <a href="https://docs.pytest.org/en/stable/" target="_blank">pytest</a>.</h4>
10+
<h4 align="center">Modern Web Testing with <a href="https://www.selenium.dev/documentation/" target="_blank">Selenium</a> and <a href="https://docs.pytest.org/en/stable/" target="_blank">Pytest</a>.</h4>
1111
<p align="center">
1212
<a href="https://github.com/seleniumbase/SeleniumBase/releases">
1313
<img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=2277EE" alt="Latest Release on GitHub" /></a> <a href="https://pypi.python.org/pypi/seleniumbase" target="_blank">
@@ -20,32 +20,61 @@
2020
<p align="center">
2121
<a href="#python_installation">🚀 Start</a> |
2222
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md">🏰 Features</a> |
23-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">👩‍🏫 Examples</a> |
24-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">🖥️ Options</a> |
25-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/console_scripts/ReadMe.md">🧙 Scripts</a> |
26-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mobile_testing.md">📱 Mobile</a> |
27-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/visual_testing/ReadMe.md">🖼️ Visual</a>
23+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md"> Examples</a> |
24+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">🎛️ Options</a> |
25+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/console_scripts/ReadMe.md">🔮 Scripts</a> |
26+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/commander.md">🎖️ Cmdr</a> |
27+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/js_package_manager.md">🕹️ JSMgr</a>
2828
<br />
2929
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">📚 API</a> |
30-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">🔵 Dashboard</a> |
3130
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">🔴 Recorder</a> |
32-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">🔠 Syntaxes</a> |
33-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/locale_codes.md">🗾 Locales</a> |
31+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">🔵 Dashboard</a> |
32+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">🔠 Formats</a> |
33+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mobile_testing.md">📱 Mobile</a> |
3434
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md">🌐 Grid</a> |
35-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/js_package_manager.md">🕹️ JSMgr</a>
35+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/dialog_boxes/ReadMe.md">🛂 Dialog</a>
3636
<br />
3737
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/ReadMe.md">🤖 CI</a> |
3838
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/boilerplates">♻️ Templates</a> |
39-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/presenter/ReadMe.md">🎞️ Presenter</a> |
4039
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/translations.md">🌏 Translator</a> |
40+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/presenter/ReadMe.md">🎞️ Presenter</a> |
4141
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">📊 Charts</a> |
4242
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md">🗺️ Tours</a> |
43-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/dialog_boxes/ReadMe.md">🛂 Dialog</a>
43+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/visual_testing/ReadMe.md">🖼️ Visual</a>
4444
</p>
4545

4646
--------
4747

48-
<p align="left"><b>One of many examples:</b> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py">test_demo_site.py</a></p>
48+
<p align="left">An example test using the <code>BaseCase</code> class:</p>
49+
50+
```python
51+
from seleniumbase import BaseCase
52+
53+
class Test_MFA_Login(BaseCase):
54+
def test_mfa_login(self):
55+
self.open("https://seleniumbase.io/realworld/login")
56+
self.type("input#username", "demo_user")
57+
self.type("input#password", "secret_pass")
58+
self.enter_mfa_code("#totpcode", "GAXG2MTEOR3DMMDG")
59+
self.click('a:contains("This Page")')
60+
self.assert_text("Welcome!", "h1")
61+
self.save_screenshot_to_logs()
62+
```
63+
64+
<p align="left">An example test using the <code>sb</code> fixture:</p>
65+
66+
```python
67+
def test_mfa_login(sb):
68+
sb.open("https://seleniumbase.io/realworld/login")
69+
sb.type("input#username", "demo_user")
70+
sb.type("input#password", "secret_pass")
71+
sb.enter_mfa_code("#totpcode", "GAXG2MTEOR3DMMDG")
72+
sb.click('a:contains("This Page")')
73+
sb.assert_text("Welcome!", "h1")
74+
sb.save_screenshot_to_logs()
75+
```
76+
77+
<p align="left">An example of running a test: <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py">test_demo_site.py</a></p>
4978

5079
```bash
5180
cd examples/
@@ -54,7 +83,6 @@ pytest test_demo_site.py
5483

5584
<p align="left"><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py"><img src="https://seleniumbase.io/cdn/gif/demo_page_4.gif" width="400" alt="SeleniumBase Demo Mode" title="SeleniumBase Test" /></a></p>
5685

57-
5886
<a id="python_installation"></a>
5987
<h2><img src="https://seleniumbase.io/img/green_logo.png" title="SeleniumBase" width="32" /> Python Setup:</h2>
6088

examples/ReadMe.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<h3 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/sb_logo_10t.png" alt="SeleniumBase" title="SeleniumBase" width="240"></a></h3>
2-
31
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Running Example Tests:</h2>
42

53
<p align="left"><a align="center" href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py"><img align="center" src="https://seleniumbase.io/cdn/img/sb_demo_page.png" alt="SeleniumBase Demo Page" width="420" /></a></p>
@@ -15,14 +13,22 @@
1513

1614
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Example tests with run commands to help you get started:</h3>
1715

18-
Run an example test in Chrome: (Default: ``--browser=chrome``)
16+
Run an [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) in Chrome: (Default: ``--browser=chrome``)
1917

2018
```bash
2119
pytest my_first_test.py
2220
```
2321

2422
<img src="https://seleniumbase.io/cdn/gif/swag_labs_4.gif" /><br />
2523

24+
Run an [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py) on the SeleniumBase Demo Site:
25+
26+
```bash
27+
pytest test_demo_site.py
28+
```
29+
30+
<img src="https://seleniumbase.io/cdn/gif/demo_page_4.gif" title="SeleniumBase Demo Page" /><br />
31+
2632
Run an example test in Firefox:
2733

2834
```bash
@@ -37,7 +43,7 @@ pytest test_swag_labs.py --demo
3743

3844
<img src="https://seleniumbase.io/cdn/gif/swag_demo_3.gif" /><br />
3945

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

4248
```bash
4349
pytest wordle_test.py
@@ -51,35 +57,27 @@ Run an example test in Headless Mode: (invisible browser)
5157
pytest my_first_test.py --headless
5258
```
5359

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)
5561

5662
```bash
5763
pytest test_swag_labs.py --mobile
5864
```
5965

6066
<img src="https://seleniumbase.io/cdn/gif/swag_mobile_2.gif" title="SeleniumBase Mobile Mode" /><br />
6167

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)
6369

6470
```bash
6571
pytest test_suite.py -v
6672
```
6773

68-
Run a test on the Demo Site to try many SeleniumBase methods:
69-
70-
```bash
71-
pytest test_demo_site.py
72-
```
73-
74-
<img src="https://seleniumbase.io/cdn/gif/demo_page_4.gif" title="SeleniumBase Demo Page" /><br />
75-
76-
Run tests multi-threaded using [n] threads:
74+
Run a test suite multi-threaded using [n] threads:
7775

7876
```bash
7977
pytest test_suite.py -n=4
8078
```
8179

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)
8381

8482
```bash
8583
pytest parameterized_test.py -v
@@ -97,7 +95,7 @@ Run a test suite and generate a pytest report:
9795
pytest test_suite.py --html=report.html
9896
```
9997

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)
10199

102100
```bash
103101
pytest test_fail.py
@@ -109,25 +107,25 @@ Run a failing test with Debug-mode enabled: (``pdb`` activates on failures)
109107
pytest test_fail.py --pdb -s
110108
```
111109

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:
113111

114112
```bash
115113
pytest -m marker_test_suite -v
116114
```
117115

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:
119117

120118
```bash
121119
pytest test_suite.py --reuse-session
122120
```
123121

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:
125123

126124
```bash
127125
pytest rate_limiting_test.py
128126
```
129127

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:
131129

132130
```bash
133131
pytest upload_file_test.py

examples/example_logs/ReadMe.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<h3 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/sb_logo_10t.png" alt="SeleniumBase" title="SeleniumBase" width="240"></a></h3>
2-
31
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Logs, The Dashboard, and Reports:</h3>
42

53
<!-- YouTube View --><a href="https://www.youtube.com/watch?v=XpuJCjJhJwQ"><img src="http://img.youtube.com/vi/XpuJCjJhJwQ/0.jpg" title="SeleniumBase on YouTube" width="285" /></a>

help_docs/ReadMe.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
<div><a href="https://github.com/seleniumbase/SeleniumBase"><img src="https://seleniumbase.io/cdn/img/mac_sb_logo_5.png" alt="SeleniumBase" width="304" /></a></div>
2-
31
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Help Docs</h2>
42

53
<p align="left">
6-
<a href="https://seleniumbase.io/#python_installation">🚀 Start</a> |
7-
<a href="https://seleniumbase.io/help_docs/customizing_test_runs/">🖥️ CLI</a> |
8-
<a href="https://seleniumbase.io/help_docs/features_list/">🏰 Features</a>
4+
<a href="https://seleniumbase.io/#python_installation">🚀 Start</a>
5+
<br />
6+
<a href="https://seleniumbase.io/help_docs/features_list/">🏰 Features</a> |
7+
<a href="https://seleniumbase.io/help_docs/customizing_test_runs/">🎛️ Options</a>
98
<br />
10-
<a href="https://seleniumbase.io/examples/ReadMe/">👨‍🏫 Examples</a> |
9+
<a href="https://seleniumbase.io/examples/ReadMe/"> Examples</a> |
1110
<a href="https://seleniumbase.io/help_docs/mobile_testing/">📱 Mobile</a>
1211
<br />
1312
<a href="https://seleniumbase.io/help_docs/syntax_formats/">🔠 Syntax Formats</a> |
@@ -17,7 +16,7 @@
1716
<a href="https://seleniumbase.io/examples/example_logs/ReadMe/">📊 Reports</a> |
1817
<a href="https://seleniumbase.io/examples/tour_examples/ReadMe/">🗺️ Tours</a>
1918
<br />
20-
<a href="https://seleniumbase.io/seleniumbase/console_scripts/ReadMe/">🧙‍ Console Scripts</a> |
19+
<a href="https://seleniumbase.io/seleniumbase/console_scripts/ReadMe/">🔮 Console Scripts</a> |
2120
<a href="https://seleniumbase.io/seleniumbase/utilities/selenium_grid/ReadMe/">🌐 Grid</a>
2221
<br />
2322
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/boilerplates">♻️ Boilerplates</a> |
@@ -33,7 +32,7 @@
3332
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/node_js">🏃 NodeRunner</a>
3433
<br />
3534
<a href="https://seleniumbase.io/examples/presenter/ReadMe/">🎞️ Presenter</a> |
36-
<a href="https://seleniumbase.io/examples/chart_maker/ReadMe/">📶 ChartMaker</a>
35+
<a href="https://seleniumbase.io/examples/chart_maker/ReadMe/">📊 ChartMaker</a>
3736
</p>
3837

3938
--------

0 commit comments

Comments
 (0)