Skip to content

Commit 3f661ea

Browse files
committed
Update the docs
1 parent a4a3b73 commit 3f661ea

File tree

8 files changed

+118
-90
lines changed

8 files changed

+118
-90
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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/logo6.png" />
77

8-
<h2 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/sb_banner_t.png" alt="SeleniumBase" title="SeleniumBase" width="530" /></a></h2>
8+
<h2 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/sb_banner_2t.png" alt="SeleniumBase" title="SeleniumBase" width="530" /></a></h2>
99
<h4 align="center">Everything you need for web testing.</h4>
1010
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/releases">
1111
<img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=2277EE" alt="Latest Release on GitHub" /></a> <a href="https://pypi.org/project/seleniumbase/">

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
regex>=2021.9.30
22
tqdm>=4.62.3
33
livereload==2.6.3;python_version>="3.6"
4-
joblib==1.0.1;python_version>="3.6"
4+
joblib==1.1.0;python_version>="3.6"
55
Markdown==3.3.4;python_version>="3.6"
66
MarkupSafe==2.0.1;python_version>="3.6"
77
jsmin==3.0.0;python_version>="3.6"
@@ -20,7 +20,7 @@ lunr==0.6.0;python_version>="3.6"
2020
nltk==3.6.4;python_version>="3.6"
2121
watchdog==2.1.6;python_version>="3.6"
2222
mkdocs==1.2.2;python_version>="3.6"
23-
mkdocs-material==7.3.1;python_version>="3.6"
23+
mkdocs-material==7.3.2;python_version>="3.6"
2424
mkdocs-exclude-search==0.5.2;python_version>="3.6"
2525
mkdocs-simple-hooks==0.1.3
2626
mkdocs-material-extensions==1.0.3;python_version>="3.6"

help_docs/recorder_mode.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class RecorderTest(BaseCase):
6868

6969
<p>🔴 SeleniumBase <code>1.66.3</code> improves the algorithm for generating efficient selectors. Additionally, single and double quotes in selectors will now be properly escaped with backslashes as needed.</p>
7070

71-
<p>🔴 SeleniumBase <code>1.66.4</code> adds better error-handling when using The Recorder, as well as a few other improvements.</p>
71+
<p>🔴 SeleniumBase <code>1.66.4</code> adds better error-handling for the Recorder, and a few other improvements.</p>
7272

7373
<p>🔴 SeleniumBase <code>1.66.5</code> improves the algorithm for converting recorded actions into SeleniumBase code.</p>
7474

@@ -80,6 +80,8 @@ class RecorderTest(BaseCase):
8080

8181
<p>🔴 SeleniumBase <code>1.66.9</code> allows the Recorder to record methods related to file downloads. It also updates how the Recorder handles class-parsing and form submissions.</p>
8282

83+
<p>🔴 SeleniumBase <code>1.66.10</code> adds better error-handling for the Recorder. It also adds the console script option <code>-r</code> for <code>sbase mkfile</code> to generate a new test file with a breakpoint for Recorder Mode: <code>sbase mkfile NEW_FILE.py -r</code></p>
84+
8385
--------
8486

8587
<div>To learn more about SeleniumBase, check out the Docs Site:</div>

mkdocs.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@ nav:
128128
- Drag & Drop Demo Page: https://seleniumbase.io/other/drag_and_drop
129129
- Virtual Device Farm: https://seleniumbase.io/devices/
130130
- Error Demo Page: https://seleniumbase.io/error_page/
131+
- Page with broken links: https://seleniumbase.io/other/broken_page
132+
- W3Schools iframes: https://seleniumbase.io/w3schools/iframes
133+
- W3Schools doubleclick: https://seleniumbase.io/w3schools/double_click
134+
- W3Schools checkboxes: https://seleniumbase.io/w3schools/checkboxes
135+
- W3Schools drag & drop: https://seleniumbase.io/w3schools/drag_drop
136+
- W3Schools radio buttons: https://seleniumbase.io/w3schools/radio_buttons
137+
- SeleniumBase in iframe: https://seleniumbase.io/w3schools/sbase
138+
- HTML Playground Page: https://seleniumbase.io/w3schools/
131139
- Presentations:
132140
- Presenter Demo: https://seleniumbase.io/other/presenter.html
133141
- Core Presentation: https://seleniumbase.io/other/core_presentation.html

seleniumbase/console_scripts/ReadMe.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,31 @@ SeleniumBase console scripts help you get things done more easily, such as insta
1515
### install
1616

1717
* Usage:
18-
``sbase install [DRIVER] [VERSION]``
19-
(Drivers: ``chromedriver``, ``geckodriver``, ``edgedriver``,
20-
``iedriver``, ``operadriver``)
21-
(Versions: ``latest`` or a specific driver version.
22-
For chromedriver, you can also specify the major
23-
version int, or ``latest-1`` for latest minus 1.
24-
If none specified, installs the default version.)
18+
``sbase install [DRIVER] [OPTIONS]``
2519

2620
* Examples:
27-
``sbase install chromedriver``
2821

29-
* Options:
30-
``latest``:
22+
```bash
23+
sbase install chromedriver
24+
sbase install geckodriver
25+
sbase install edgedriver
26+
sbase install chromedriver 94
27+
sbase install chromedriver 94.0.4606.61
28+
sbase install chromedriver latest
29+
sbase install chromedriver latest-1 # (Latest minus one)
30+
sbase install chromedriver -p
31+
sbase install chromedriver latest -p
32+
sbase install edgedriver 94.0.992.38
33+
```
34+
35+
(Drivers: ``chromedriver``, ``geckodriver``, ``edgedriver``,
36+
``iedriver``, ``operadriver``)
37+
38+
(Options: ``latest`` or a specific driver version.
39+
For chromedriver, you can also specify the major
40+
version int, or ``latest-1`` for latest minus 1.
41+
If none specified, installs the default version.
42+
``-p`` / ``--path``: Also copy to "/usr/local/bin".)
3143

3244
* Output:
3345
Installs the specified webdriver.
@@ -120,6 +132,7 @@ ui_tests/
120132

121133
* Options:
122134
``-b`` / ``--basic`` (Basic boilerplate / single-line test)
135+
``-r`` / ``--recorder`` (Recorder Mode has ipdb breakpoint)
123136

124137
* Language Options:
125138
``--en`` / ``--English`` | ``--zh`` / ``--Chinese``

seleniumbase/console_scripts/run.py

Lines changed: 64 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@ def show_install_usage():
120120
print(" sbase install chromedriver")
121121
print(" sbase install geckodriver")
122122
print(" sbase install edgedriver")
123-
print(" sbase install chromedriver 91")
124-
print(" sbase install chromedriver 91.0.4472.101")
123+
print(" sbase install chromedriver 94")
124+
print(" sbase install chromedriver 94.0.4606.61")
125125
print(" sbase install chromedriver latest")
126126
print(" sbase install chromedriver latest-1")
127127
print(" sbase install chromedriver -p")
128128
print(" sbase install chromedriver latest -p")
129-
print(" sbase install edgedriver 91.0.864.71")
129+
print(" sbase install edgedriver 94.0.992.38")
130130
print(" Output:")
131131
print(" Installs the chosen webdriver to seleniumbase/drivers/")
132132
print(" (chromedriver is required for Chrome automation)")
@@ -150,7 +150,7 @@ def show_mkdir_usage():
150150
print(" Example:")
151151
print(" sbase mkdir ui_tests")
152152
print(" Options:")
153-
print(" -b / --basic (Only config files. No tests added.)")
153+
print(" -b / --basic (Only config files. No tests added.)")
154154
print(" Output:")
155155
print(" Creates a new folder for running SBase scripts.")
156156
print(" The new folder contains default config files,")
@@ -173,22 +173,23 @@ def show_mkfile_usage():
173173
print(" Example:")
174174
print(" sbase mkfile new_test.py")
175175
print(" Options:")
176-
print(" -b / --basic (Basic boilerplate / single-line test)")
176+
print(" -b / --basic (Basic boilerplate / single-line test)")
177+
print(" -r / --recorder (Recorder Mode has ipdb breakpoint)")
177178
print(" Language Options:")
178-
print(" --en / --English | --zh / --Chinese")
179-
print(" --nl / --Dutch | --fr / --French")
180-
print(" --it / --Italian | --ja / --Japanese")
181-
print(" --ko / --Korean | --pt / --Portuguese")
182-
print(" --ru / --Russian | --es / --Spanish")
179+
print(" --en / --English | --zh / --Chinese")
180+
print(" --nl / --Dutch | --fr / --French")
181+
print(" --it / --Italian | --ja / --Japanese")
182+
print(" --ko / --Korean | --pt / --Portuguese")
183+
print(" --ru / --Russian | --es / --Spanish")
183184
print(" Output:")
184-
print(" Creates a new SBase test file with boilerplate code.")
185-
print(" If the file already exists, an error is raised.")
186-
print(" By default, uses English mode and creates a")
187-
print(" boilerplate with the 5 most common SeleniumBase")
188-
print(' methods, which are "open", "type", "click",')
189-
print(' "assert_element", and "assert_text". If using the')
190-
print(' basic boilerplate option, only the "open" method')
191-
print(" is included.")
185+
print(" Creates a new SBase test file with boilerplate code.")
186+
print(" If the file already exists, an error is raised.")
187+
print(" By default, uses English mode and creates a")
188+
print(" boilerplate with the 5 most common SeleniumBase")
189+
print(' methods, which are "open", "type", "click",')
190+
print(' "assert_element", and "assert_text". If using the')
191+
print(' basic boilerplate option, only the "open" method')
192+
print(" is included.")
192193
print("")
193194

194195

@@ -205,17 +206,17 @@ def show_mkpres_usage():
205206
print(" Example:")
206207
print(" sbase mkpres new_presentation.py --en")
207208
print(" Language Options:")
208-
print(" --en / --English | --zh / --Chinese")
209-
print(" --nl / --Dutch | --fr / --French")
210-
print(" --it / --Italian | --ja / --Japanese")
211-
print(" --ko / --Korean | --pt / --Portuguese")
212-
print(" --ru / --Russian | --es / --Spanish")
209+
print(" --en / --English | --zh / --Chinese")
210+
print(" --nl / --Dutch | --fr / --French")
211+
print(" --it / --Italian | --ja / --Japanese")
212+
print(" --ko / --Korean | --pt / --Portuguese")
213+
print(" --ru / --Russian | --es / --Spanish")
213214
print(" Output:")
214-
print(" Creates a new presentation with 3 example slides.")
215-
print(" If the file already exists, an error is raised.")
216-
print(" By default, the slides are written in English,")
217-
print(' and use "serif" theme with "slide" transition.')
218-
print(" The slides can be used as a basic boilerplate.")
215+
print(" Creates a new presentation with 3 example slides.")
216+
print(" If the file already exists, an error is raised.")
217+
print(" By default, the slides are written in English,")
218+
print(' and use "serif" theme with "slide" transition.')
219+
print(" The slides can be used as a basic boilerplate.")
219220
print("")
220221

221222

@@ -232,17 +233,17 @@ def show_mkchart_usage():
232233
print(" Example:")
233234
print(" sbase mkchart new_chart.py --en")
234235
print(" Language Options:")
235-
print(" --en / --English | --zh / --Chinese")
236-
print(" --nl / --Dutch | --fr / --French")
237-
print(" --it / --Italian | --ja / --Japanese")
238-
print(" --ko / --Korean | --pt / --Portuguese")
239-
print(" --ru / --Russian | --es / --Spanish")
236+
print(" --en / --English | --zh / --Chinese")
237+
print(" --nl / --Dutch | --fr / --French")
238+
print(" --it / --Italian | --ja / --Japanese")
239+
print(" --ko / --Korean | --pt / --Portuguese")
240+
print(" --ru / --Russian | --es / --Spanish")
240241
print(" Output:")
241-
print(" Creates a new SeleniumBase chart presentation.")
242-
print(" If the file already exists, an error is raised.")
243-
print(" By default, the slides are written in English,")
244-
print(' and use a "sky" theme with "slide" transition.')
245-
print(" The chart can be used as a basic boilerplate.")
242+
print(" Creates a new SeleniumBase chart presentation.")
243+
print(" If the file already exists, an error is raised.")
244+
print(" By default, the slides are written in English,")
245+
print(' and use a "sky" theme with "slide" transition.')
246+
print(" The chart can be used as a basic boilerplate.")
246247
print("")
247248

248249

@@ -273,13 +274,13 @@ def show_print_usage():
273274
print(sc)
274275
print("")
275276
print(" Usage:")
276-
print(" seleniumbase print [FILE] [OPTIONS]")
277-
print(" OR: sbase print [FILE] [OPTIONS]")
277+
print(" seleniumbase print [FILE] [OPTIONS]")
278+
print(" OR: sbase print [FILE] [OPTIONS]")
278279
print(" Options:")
279-
print(" -n (Add line Numbers to the rows)")
280+
print(" -n (Add line Numbers to the rows)")
280281
print(" Output:")
281-
print(" Prints the code/text of any file")
282-
print(" with syntax-highlighting.")
282+
print(" Prints the code/text of any file")
283+
print(" with syntax-highlighting.")
283284
print("")
284285

285286

@@ -291,30 +292,30 @@ def show_translate_usage():
291292
print(sc)
292293
print("")
293294
print(" Usage:")
294-
print(" seleniumbase translate [SB_FILE.py] [LANG] [ACTION]")
295-
print(" OR: sbase translate [SB_FILE.py] [LANG] [ACTION]")
295+
print(" seleniumbase translate [SB_FILE.py] [LANG] [ACTION]")
296+
print(" OR: sbase translate [SB_FILE.py] [LANG] [ACTION]")
296297
print(" Languages:")
297-
print(" --en / --English | --zh / --Chinese")
298-
print(" --nl / --Dutch | --fr / --French")
299-
print(" --it / --Italian | --ja / --Japanese")
300-
print(" --ko / --Korean | --pt / --Portuguese")
301-
print(" --ru / --Russian | --es / --Spanish")
298+
print(" --en / --English | --zh / --Chinese")
299+
print(" --nl / --Dutch | --fr / --French")
300+
print(" --it / --Italian | --ja / --Japanese")
301+
print(" --ko / --Korean | --pt / --Portuguese")
302+
print(" --ru / --Russian | --es / --Spanish")
302303
print(" Actions:")
303-
print(" -p / --print (Print translation output to the screen)")
304-
print(" -o / --overwrite (Overwrite the file being translated)")
305-
print(" -c / --copy (Copy the translation to a new .py file)")
304+
print(" -p / --print (Print translation output to the screen)")
305+
print(" -o / --overwrite (Overwrite the file being translated)")
306+
print(" -c / --copy (Copy the translation to a new .py file)")
306307
print(" Options:")
307-
print(" -n (include line Numbers when using the Print action)")
308+
print(" -n (include line Numbers when using the Print action)")
308309
print(" Output:")
309-
print(" Translates a SeleniumBase Python file into the language")
310-
print(' specified. Method calls and "import" lines get swapped.')
311-
print(" Both a language and an action must be specified.")
312-
print(' The "-p" action can be paired with one other action.')
313-
print(' When running with "-c" (or "--copy"), the new file name')
314-
print(" will be the original name appended with an underscore")
315-
print(" plus the 2-letter language code of the new language.")
316-
print(' (Example: Translating "test_1.py" into Japanese with')
317-
print(' "-c" will create a new file called "test_1_ja.py".)')
310+
print(" Translates a SeleniumBase Python file into the language")
311+
print(' specified. Method calls and "import" lines get swapped.')
312+
print(" Both a language and an action must be specified.")
313+
print(' The "-p" action can be paired with one other action.')
314+
print(' When running with "-c" (or "--copy"), the new file name')
315+
print(" will be the original name appended with an underscore")
316+
print(" plus the 2-letter language code of the new language.")
317+
print(' (Example: Translating "test_1.py" into Japanese with')
318+
print(' "-c" will create a new file called "test_1_ja.py".)')
318319
print("")
319320

320321

seleniumbase/console_scripts/sb_install.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
sbase install chromedriver
1414
sbase install geckodriver
1515
sbase install edgedriver
16-
sbase install chromedriver 91.0.4472.101
17-
sbase install chromedriver 91
16+
sbase install chromedriver 94.0.4606.61
17+
sbase install chromedriver 94
1818
sbase install chromedriver latest
1919
sbase install chromedriver latest-1 # (Latest minus one)
2020
sbase install chromedriver -p
2121
sbase install chromedriver latest -p
22-
sbase install edgedriver 91.0.864.67
22+
sbase install edgedriver 94.0.992.38
2323
Output:
2424
Installs the chosen webdriver to seleniumbase/drivers/
2525
(chromedriver is required for Chrome automation)
@@ -52,7 +52,8 @@
5252
def invalid_run_command():
5353
exp = " ** install **\n\n"
5454
exp += " Usage:\n"
55-
exp += " seleniumbase install [DRIVER_NAME] [OPTIONS]\n"
55+
exp += " seleniumbase install [DRIVER] [OPTIONS]\n"
56+
exp += " OR sbase install [DRIVER] [OPTIONS]\n"
5657
exp += " (Drivers: chromedriver, geckodriver, edgedriver,\n"
5758
exp += " iedriver, operadriver)\n"
5859
exp += " Options:\n"
@@ -61,13 +62,16 @@ def invalid_run_command():
6162
exp += ' Use "latest" for the latest version.\n'
6263
exp += " -p OR --path Also copy the driver to /usr/local/bin\n"
6364
exp += " Example:\n"
64-
exp += " seleniumbase install chromedriver\n"
65-
exp += " seleniumbase install geckodriver\n"
66-
exp += " seleniumbase install chromedriver 91\n"
67-
exp += " seleniumbase install chromedriver 91.0.4472.101\n"
68-
exp += " seleniumbase install chromedriver latest\n"
69-
exp += " seleniumbase install chromedriver -p\n"
70-
exp += " seleniumbase install chromedriver latest -p\n"
65+
exp += " sbase install chromedriver\n"
66+
exp += " sbase install geckodriver\n"
67+
exp += " sbase install edgedriver"
68+
exp += " sbase install chromedriver 94\n"
69+
exp += " sbase install chromedriver 94.0.4606.61\n"
70+
exp += " sbase install chromedriver latest\n"
71+
exp += " sbase install chromedriver latest-1\n"
72+
exp += " sbase install chromedriver -p\n"
73+
exp += " sbase install chromedriver latest -p\n"
74+
exp += " sbase install edgedriver 94.0.992.38"
7175
exp += " Output:\n"
7276
exp += " Installs the chosen webdriver to seleniumbase/drivers/\n"
7377
exp += " (chromedriver is required for Chrome automation)\n"

seleniumbase/fixtures/base_case.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4984,8 +4984,8 @@ def assert_title(self, title):
49844984

49854985
def assert_no_js_errors(self):
49864986
"""Asserts that there are no JavaScript "SEVERE"-level page errors.
4987-
Works ONLY for Chrome (non-headless) and Chrome-based browsers.
4988-
Does NOT work on Firefox, Edge, IE, and some other browsers:
4987+
Works ONLY on Chromium browsers (Chrome or Edge).
4988+
Does NOT work on Firefox, IE, Safari, or some other browsers:
49894989
* See https://github.com/SeleniumHQ/selenium/issues/1161
49904990
Based on the following Stack Overflow solution:
49914991
* https://stackoverflow.com/a/41150512/7058266

0 commit comments

Comments
 (0)