Skip to content

Commit 8b11e33

Browse files
committed
Update the docs
1 parent 25b7bd4 commit 8b11e33

File tree

8 files changed

+122
-29
lines changed

8 files changed

+122
-29
lines changed

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ readme-renderer==30.0
1616
pymdown-extensions==9.0;python_version>="3.6"
1717
importlib-metadata==4.8.1;python_version>="3.6"
1818
bleach==4.1.0
19-
lunr==0.6.0;python_version>="3.6"
19+
lunr==0.6.1;python_version>="3.6"
2020
nltk==3.6.5;python_version>="3.6"
2121
watchdog==2.1.6;python_version>="3.6"
2222
mkdocs==1.2.3;python_version>="3.6"
23-
mkdocs-material==7.3.3;python_version>="3.6"
23+
mkdocs-material==7.3.4;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"

examples/ReadMe.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Running Example Tests:</h2>
44

5-
<p align="left"><a align="center" href="https://github.com/seleniumbase/SeleniumBase/blob/master/README.md"><img align="center" src="https://seleniumbase.io/cdn/img/sb_demo_page.png" alt="SeleniumBase" width="420" /></a></p>
6-
5+
<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>
76

87
* <b>SeleniumBase</b> tests are run with <b>pytest</b>.
98
* Chrome is the default browser if not specified.

help_docs/features_list.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[<img src="https://seleniumbase.io/cdn/img/super_logo_sb.png" title="SeleniumBase" width="285">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
1+
[<img src="https://seleniumbase.io/cdn/img/sb_logo_10t.png" title="SeleniumBase" width="240">](https://github.com/seleniumbase/SeleniumBase/)
22

33
<!-- YouTube View --><a href="https://www.youtube.com/watch?v=Sjzq9kU5kOw"><img src="http://img.youtube.com/vi/Sjzq9kU5kOw/0.jpg" title="SeleniumBase on YouTube" width="285" /></a>
44
<!-- GitHub Only --><p>(<b><a href="https://www.youtube.com/watch?v=Sjzq9kU5kOw">Watch the tutorial on YouTube</a></b>)</p>
@@ -45,3 +45,5 @@
4545

4646
<!-- YouTube View --><a href="https://www.youtube.com/watch?v=yEQeAU_mrg0"><img src="http://img.youtube.com/vi/yEQeAU_mrg0/0.jpg" title="SeleniumBase on YouTube" width="285" /></a>
4747
<!-- GitHub Only --><p>(<b><a href="https://www.youtube.com/watch?v=yEQeAU_mrg0">Have fun with test automation!</a></b>)</p>
48+
49+
[<img src="https://seleniumbase.io/cdn/img/super_logo_sb.png" title="SeleniumBase" width="285">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)

help_docs/happy_customers.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* [Veracode](https://www.veracode.com/)
88
* [Autodesk](https://www.autodesk.com/)
99
* [Broadcom](https://www.broadcom.com/)
10+
* [FortressIQ](https://www.fortressiq.com/)
1011
* [Thoma Bravo](https://www.thomabravo.com/)
1112
* [Expedia Group](https://lifeatexpediagroup.com/)
1213
* [Texture Health](https://www.texturehealth.com/)
@@ -35,8 +36,8 @@
3536
* [netLex](https://netlex.io/en/)
3637
* [Cubic](https://www.cubic.com/)
3738
* [Baidu](https://www.baidu.com/)
38-
* [Iver](https://www.iver.com/)
3939
* [HqO](https://www.hqo.co/)
40+
* [Iver](https://www.iver.com/)
4041
* And more...
4142

4243
<h3>Case Study: (<i>HubSpot</i>)</h3>

help_docs/method_summary.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[<img src="https://seleniumbase.io/cdn/img/sb_text_f.png" title="SeleniumBase" align="center" width="360">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
1+
[<img src="https://seleniumbase.io/cdn/img/sb_logo_10t.png" title="SeleniumBase" width="240">](https://github.com/seleniumbase/SeleniumBase/)
22

33
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Methods (API Reference)</h2>
44

@@ -709,3 +709,5 @@ self._print(TEXT) # Calls Python's print() / Allows for translations
709709
* [test_suite.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_suite.py)
710710
* [test_tinymce.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_tinymce.py)
711711
* And many more...
712+
713+
[<img src="https://seleniumbase.io/cdn/img/sb_text_f.png" title="SeleniumBase" align="center" width="360">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)

help_docs/recorder_mode.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ class RecorderTest(BaseCase):
7474

7575
<p>🔴 SeleniumBase <code>1.66.14</code> improves the algorithm for converting recorded assertions into SeleniumBase code. Text assertions that contain the newline character will now be handled correctly. If a text assertion has a <code>:contains</code> selector, then the text assertion will be changed to an element assertion. Asserted text from multi-line assertions will use <code>self.assert_text()</code> on the first non-empty line. Asserted text from single-line assertions will use <code>self.assert_exact_text()</code>. Element assertions will be handled with <code>self.assert_element()</code>.</p>
7676

77+
<p>🔴 SeleniumBase <code>2.0.1</code> adds the ability to preview selectors via the page title when hovering over elements. It also fixes an issue that may occur when opening up new URLs while in Recorder Mode.</p>
78+
7779
--------
7880

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

help_docs/virtualenv_instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ There are multiple ways of creating a **[Python virtual environment](https://pac
1212
(The [Python Software Foundation](https://www.python.org/psf/) recommends ``venv`` for creating virtual environments.)
1313

1414

15-
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Part 1: Using "venv"</h3>
15+
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Option 1: Using "venv"</h3>
1616

1717
> macOS/Linux terminal (``python3 -m venv ENV``)
1818
@@ -32,7 +32,7 @@ To exit a virtual env, type ``deactivate``.
3232

3333
--------
3434

35-
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Part 2: Using virtualenvwrapper</h3>
35+
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Option 2: Using virtualenvwrapper</h3>
3636

3737
> macOS/Linux terminal:
3838

seleniumbase/console_scripts/ReadMe.md

Lines changed: 107 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[<img src="https://seleniumbase.io/cdn/img/sb_logo_10t.png" title="SeleniumBase" width="240">](https://github.com/seleniumbase/SeleniumBase/)
22

3-
## Console Scripts
3+
<h2>Console Scripts</h2>
44

55
SeleniumBase console scripts help you get things done more easily, such as installing web drivers, creating a test directory with necessary configuration files, converting old WebDriver unittest scripts into SeleniumBase code, translating tests into multiple languages, and using the Selenium Grid.
66

@@ -12,7 +12,36 @@ SeleniumBase console scripts help you get things done more easily, such as insta
1212

1313
(<i>For running tests, [use <b>pytest</b> with SeleniumBase](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md).</i>)
1414

15-
### install
15+
```
16+
COMMANDS:
17+
install [DRIVER] [OPTIONS]
18+
methods (List common Python methods)
19+
options (List common pytest options)
20+
mkdir [DIRECTORY] [OPTIONS]
21+
mkfile [FILE.py] [OPTIONS]
22+
mkrec [FILE.py]
23+
mkpres [FILE.py] [LANG]
24+
mkchart [FILE.py] [LANG]
25+
print [FILE] [OPTIONS]
26+
translate [SB_FILE.py] [LANG] [ACTION]
27+
convert [WEBDRIVER_UNITTEST_FILE.py]
28+
extract-objects [SB_FILE.py]
29+
inject-objects [SB_FILE.py] [OPTIONS]
30+
objectify [SB_FILE.py] [OPTIONS]
31+
revert-objects [SB_FILE.py] [OPTIONS]
32+
encrypt (OR: obfuscate)
33+
decrypt (OR: unobfuscate)
34+
download server (The Selenium Grid JAR file)
35+
grid-hub [start|stop] [OPTIONS]
36+
grid-node [start|stop] --hub=[HOST/IP]
37+
* (EXAMPLE: "sbase install chromedriver latest") *
38+
39+
Type "sbase help [COMMAND]" for specific command info.
40+
For info on all commands, type: "seleniumbase --help".
41+
Use "pytest" for running tests.
42+
```
43+
44+
<h3>install</h3>
1645

1746
* Usage:
1847
``sbase install [DRIVER] [OPTIONS]``
@@ -49,15 +78,15 @@ Installs the specified webdriver.
4978
(``iedriver`` is required for Internet Explorer automation)
5079
(``operadriver`` is required for Opera Browser automation)
5180

52-
### methods
81+
<h3>methods</h3>
5382

5483
* Usage:
5584
``sbase methods``
5685

5786
* Output:
5887
Displays common SeleniumBase Python methods.
5988

60-
### options
89+
<h3>options</h3>
6190

6291
* Usage:
6392
``sbase options``
@@ -66,7 +95,53 @@ Displays common SeleniumBase Python methods.
6695
Displays common pytest command-line options
6796
that are available when using SeleniumBase.
6897

69-
### mkdir
98+
```
99+
--browser=BROWSER (The web browser to use. Default is "chrome")
100+
--headless (Run tests headlessly. Default mode on Linux OS.)
101+
--demo (Slow down and visually see test actions as they occur.)
102+
--slow (Slow down the automation. Faster than using Demo Mode.)
103+
--reuse-session / --rs (Reuse browser session between tests.)
104+
--crumbs (Clear all cookies between tests reusing a session.)
105+
--maximize (Start tests with the web browser window maximized.)
106+
--dashboard (Enable SeleniumBase's Dashboard at dashboard.html)
107+
--incognito (Enable Chromium's Incognito mode.)
108+
--guest (Enable Chromium's Guest mode.)
109+
-m=MARKER (Run tests with the specified pytest marker.)
110+
-n=NUM (Multithread the tests using that many threads.)
111+
-v (Verbose mode. Print the full names of each test run.)
112+
--html=report.html (Create a detailed pytest-html report.)
113+
--collect-only / --co (Only show discovered tests. No run.)
114+
--co -q (Only show full names of discovered tests. No run.)
115+
--pdb (Enter the Post Mortem Debug Mode after any test fails.)
116+
--trace (Enter Debug Mode immediately after starting any test.)
117+
| Debug Mode Commands >>> help / h: List all commands. |
118+
| n: Next line of method. s: Step through. c: Continue. |
119+
| return / r: Run until method returns. j: Jump to line. |
120+
| where / w: Show stack spot. u: Up stack. d: Down stack. |
121+
| longlist / ll: See code. dir(): List namespace objects. |
122+
--recorder (Record browser actions to generate test scripts.)
123+
--save-screenshot (Save a screenshot at the end of each test.)
124+
-x (Stop running the tests after the first failure is reached.)
125+
--archive-logs (Archive old log files instead of deleting them.)
126+
--check-js (Check for JavaScript errors after page loads.)
127+
--start-page=URL (The browser start page when tests begin.)
128+
--agent=STRING (Modify the web browser's User-Agent string.)
129+
--mobile (Use Chromium's mobile device emulator during tests.)
130+
--metrics=STRING (Set mobile "CSSWidth,CSSHeight,PixelRatio".)
131+
--ad-block (Block some types of display ads after page loads.)
132+
--settings-file=FILE (Override default SeleniumBase settings.)
133+
--env=ENV (Set the test env. Access with "self.env" in tests.)
134+
--data=DATA (Extra test data. Access with "self.data" in tests.)
135+
--disable-csp (Disable the Content Security Policy of websites.)
136+
--server=SERVER (The Selenium Grid server/IP used for tests.)
137+
--port=PORT (The Selenium Grid port used by the test server.)
138+
--proxy=SERVER:PORT (Connect to a proxy server:port for tests.)
139+
--proxy=USER:PASS@SERVER:PORT (Use authenticated proxy server.)
140+
141+
For the full list of command-line options, type: "pytest --help".
142+
```
143+
144+
<h3>mkdir</h3>
70145

71146
* Usage:
72147
``sbase mkdir [DIRECTORY] [OPTIONS]``
@@ -118,7 +193,7 @@ ui_tests/
118193
└── setup.cfg
119194
```
120195

121-
### mkfile
196+
<h3>mkfile</h3>
122197

123198
* Usage:
124199
``sbase mkfile [FILE.py] [OPTIONS]``
@@ -147,7 +222,19 @@ methods, which are "open", "type", "click",
147222
basic boilerplate option, only the "open" method
148223
is included.
149224

150-
### mkpres
225+
<h3>mkrec</h3>
226+
227+
* Usage:
228+
``sbase mkrec [FILE.py]``
229+
230+
* Example:
231+
``sbase mkrec new_test.py``
232+
233+
* Output:
234+
Creates a new SeleniumBase test using the Recorder.
235+
If the filename already exists, an error is raised.
236+
237+
<h3>mkpres</h3>
151238

152239
* Usage:
153240
``sbase mkpres [FILE.py] [LANG]``
@@ -169,7 +256,7 @@ By default, the slides are written in English,
169256
and use "serif" theme with "slide" transition.
170257
The slides can be used as a basic boilerplate.
171258

172-
### mkchart
259+
<h3>mkchart</h3>
173260

174261
* Usage:
175262
``sbase mkchart [FILE.py] [LANG]``
@@ -191,7 +278,7 @@ By default, the slides are written in English,
191278
and use a "sky" theme with "slide" transition.
192279
The chart can be used as a basic boilerplate.
193280

194-
### print
281+
<h3>print</h3>
195282

196283
* Usage:
197284
``sbase print [FILE] [OPTIONS]``
@@ -203,7 +290,7 @@ The chart can be used as a basic boilerplate.
203290
Prints the code/text of any file
204291
with syntax-highlighting.
205292

206-
### translate
293+
<h3>translate</h3>
207294

208295
* Usage:
209296
``sbase translate [SB_FILE.py] [LANGUAGE] [ACTION]``
@@ -234,7 +321,7 @@ plus the 2-letter language code of the new language.
234321
(Example: Translating "test_1.py" into Japanese with
235322
``-c`` will create a new file called "test_1_ja.py".)
236323

237-
### extract-objects
324+
<h3>extract-objects</h3>
238325

239326
* Usage:
240327
``sbase extract-objects [SB_FILE.py]``
@@ -244,7 +331,7 @@ Creates page objects based on selectors found in a
244331
seleniumbase Python file and saves those objects to the
245332
"page_objects.py" file in the same folder as the tests.
246333

247-
### inject-objects
334+
<h3>inject-objects</h3>
248335

249336
* Usage:
250337
``sbase inject-objects [SB_FILE.py] [OPTIONS]``
@@ -257,7 +344,7 @@ Takes the page objects found in the "page_objects.py"
257344
file and uses those to replace matching selectors in
258345
the selected seleniumbase Python file.
259346

260-
### objectify
347+
<h3>objectify</h3>
261348

262349
* Usage:
263350
``sbase objectify [SB_FILE.py] [OPTIONS]``
@@ -272,7 +359,7 @@ have been replaced with variable names defined in
272359
(This has the same outcome as combining
273360
``extract-objects`` with ``inject-objects``)
274361

275-
### revert-objects
362+
<h3>revert-objects</h3>
276363

277364
* Usage:
278365
``sbase revert-objects [SB_FILE.py] [OPTIONS]``
@@ -286,7 +373,7 @@ Reverts the changes made by ``seleniumbase objectify ...`` or
286373
seleniumbase Python file. Objects will get replaced by
287374
selectors stored in the "page_objects.py" file.
288375

289-
### convert
376+
<h3>convert</h3>
290377

291378
* Usage:
292379
``sbase convert [WEBDRIVER_UNITTEST_FILE.py]``
@@ -298,7 +385,7 @@ file name while keeping the original file intact.
298385
Works with Katalon Recorder scripts.
299386
See [This ReadMe](https://seleniumbase.io/seleniumbase/utilities/selenium_ide/ReadMe/) for details.
300387

301-
### encrypt / obfuscate
388+
<h3>encrypt / obfuscate</h3>
302389

303390
* Usage:
304391
``sbase encrypt`` OR ``sbase obfuscate``
@@ -307,7 +394,7 @@ See [This ReadMe](https://seleniumbase.io/seleniumbase/utilities/selenium_ide/Re
307394
Runs the password encryption/obfuscation tool.
308395
(Where you can enter a password to encrypt/obfuscate.)
309396

310-
### decrypt / unobfuscate
397+
<h3>decrypt / unobfuscate</h3>
311398

312399
* Usage:
313400
``sbase decrypt`` OR ``sbase unobfuscate``
@@ -316,7 +403,7 @@ Runs the password encryption/obfuscation tool.
316403
Runs the password decryption/unobfuscation tool.
317404
(Where you can enter an encrypted password to decrypt.)
318405

319-
### download
406+
<h3>download</h3>
320407

321408
* Usage:
322409
``sbase download server``
@@ -325,7 +412,7 @@ Runs the password decryption/unobfuscation tool.
325412
Downloads the Selenium Server JAR file for Grid usage.
326413
(That JAR file is required when using a Selenium Grid)
327414

328-
### grid-hub
415+
<h3>grid-hub</h3>
329416

330417
* Usage:
331418
``sbase grid-hub {start|stop|restart} [OPTIONS]``
@@ -341,7 +428,7 @@ to speed up test runs and reduce the total time
341428
of test suite execution.
342429
You can start, restart, or stop the Grid Hub server.
343430

344-
### grid-node
431+
<h3>grid-node</h3>
345432

346433
* Usage:
347434
``sbase grid-node {start|stop|restart} [OPTIONS]``

0 commit comments

Comments
 (0)