Skip to content

Commit 9ddd80b

Browse files
committed
Update Markdown format in the docs
1 parent 7bce73a commit 9ddd80b

File tree

6 files changed

+59
-51
lines changed

6 files changed

+59
-51
lines changed

help_docs/behave_gui.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
🐝🎖️ To launch it, call ``sbase behave-gui`` or ``sbase gui-behave``:
88

9-
```bash
9+
```zsh
1010
> sbase behave-gui
1111
* Starting the SeleniumBase Behave Commander GUI App...
1212
```
@@ -15,19 +15,19 @@
1515

1616
🐝🎖️ <b translate="no">SeleniumBase Behave GUI</b> loads the same tests that are found by:
1717

18-
```bash
18+
```zsh
1919
behave -d
2020
```
2121

2222
🐝🎖️ You can customize which tests are loaded by passing additional args:
2323

24-
```bash
24+
```zsh
2525
sbase behave-gui [OPTIONAL PATH or TEST FILE]
2626
```
2727

2828
🐝🎖️ Here are examples of customizing test collection:
2929

30-
```bash
30+
```zsh
3131
sbase behave-gui # all tests
3232
sbase behave-gui -i=calculator # tests with "calculator" in the name
3333
sbase behave-gui features/ # tests located in the "features/" folder

help_docs/case_plans.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,15 @@
156156

157157
🗂️ Before you can generate a ``case_summary.md`` file that includes your existing Case Plans, first you'll need to select which existing tests you want to create boilerplate Case Plans from. For that, you can use the SeleniumBase Case Plans GUI:
158158

159-
```bash
159+
```zsh
160160
sbase caseplans
161161
```
162162

163163
<img src="https://seleniumbase.github.io/cdn/img/cp/case_plan_boilerplate_gen.png" title="SeleniumBase Case Plans GUI" width="525">
164164

165165
🗂️ Once you are running the Case Plans GUI, select the existing tests that need Case Plans, and then click: ``Generate boilerplate Case Plans for selected tests missing them``. For each selected test that didn't already have a Case Plan file, one will be generated. Each new Case Plan file starts with default boilerplate code with a Markdown table. Eg:
166166

167-
```bash
167+
```zsh
168168
``proxy_test.py::ProxyTests::test_proxy``
169169
---
170170
| # | Step Description | Expected Result |
@@ -208,7 +208,7 @@ sbase caseplans
208208

209209
🗂️ When calling ``sbase caseplans``, you can provide additional arguments to limit the tests that appear in the list. The same discovery rules apply as when using ``pytest``. Eg:
210210

211-
```bash
211+
```zsh
212212
sbase caseplans
213213
sbase caseplans -k agent
214214
sbase caseplans -m marker2

help_docs/chinese.md

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@
5656
* 建议配合 [Python virtual env](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/) . <i><a href="https://seleniumbase.io/help_docs/virtualenv_instructions/">See shortcut</a>.</i>
5757
* 更新 **[pip](https://pypi.org/project/pip/)** 以防出现警告:
5858

59-
```bash
59+
```zsh
6060
python -m pip install -U pip
6161
```
6262

6363
<a id="install_seleniumbase"></a>
6464
<h2><img src="https://seleniumbase.github.io/img/sb_icon.png" title="SeleniumBase" width="30" /> 安装 SeleniumBase:</h2>
6565

66-
```bash
66+
```zsh
6767
git clone https://github.com/seleniumbase/SeleniumBase.git
6868
cd SeleniumBase/
6969
pip install -r requirements.txt
@@ -72,7 +72,7 @@ python setup.py install
7272
如果存在多个安装的python版本, 需要显示具体版本 (E.g. 使用 ``python3`` 代替 ``python``).
7373

7474
* 你也可以通过[pypi](https://pypi.python.org/pypi/seleniumbase)安装 ``seleniumbase`` :
75-
```bash
75+
```zsh
7676
pip install seleniumbase
7777
```
7878
* 添加 ``--upgrade````-U`` 来更新安装程序.
@@ -82,19 +82,19 @@ pip install seleniumbase
8282

8383
SeleniumBase 下载 webdriver 驱动到 [seleniumbase/drivers](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/drivers) 文件夹下, 使用 ``install`` 命令:
8484

85-
```bash
85+
```zsh
8686
seleniumbase install chromedriver
8787
```
8888

8989
* 你可能需要不同的 webdriver 来对应各种网页浏览器来完成自动化测试,例如: ``chromedriver`` 对应 Chrome, ``edgedriver`` 对应 Edge, ``geckodriver`` 对应 Firefox, ``operadriver`` 对应 Opera, ``iedriver`` 对应 Internet Explorer.
9090
* 如果你需要安装最新版本的浏览器驱动, 以以下命令获取最新版本浏览器驱动 (<i>因兼容性原因,默认下载的版本为 chromedriver 2.44 </i>):
91-
```bash
91+
```zsh
9292
seleniumbase install chromedriver latest
9393
```
9494

9595
<h3><img src="https://seleniumbase.github.io/img/sb_icon.png" title="SeleniumBase" width="30" /> 使用 Chrome 运行用例:</h3>
9696

97-
```bash
97+
```zsh
9898
cd examples/
9999
pytest my_first_test.py
100100
```
@@ -104,7 +104,7 @@ pytest my_first_test.py
104104

105105
<b>运行 [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) Demo Mode:</b>
106106

107-
```bash
107+
```zsh
108108
pytest my_first_test.py --demo
109109
```
110110

@@ -259,15 +259,15 @@ element.submit()
259259
<h4>适用 ``pytest`` 或者 ``nosetests`` 在所有的浏览器中运行你的测试用例:</h4>
260260
(<i>推荐使用 **pytest** . **Chrome** 是默认的浏览器.</i>)
261261

262-
```bash
262+
```zsh
263263
pytest my_first_test.py --browser=chrome
264264

265265
nosetests test_suite.py --browser=firefox
266266
```
267267

268268
Python 文件中所有以 ``test_`` 开头的python方法将自动运行当你使用 ``pytest````nosetests``, (<i>或包含Python文件的文件夹</i>). 还可以使用以下命令更具体地说明在文件中运行什么: (<i>注意,pytest和nosetests的语法是不同的.</i>)
269269

270-
```bash
270+
```zsh
271271
pytest [FILE_NAME].py::[CLASS_NAME]::[METHOD_NAME]
272272
nosetests [FILE_NAME].py:[CLASS_NAME].[METHOD_NAME]
273273
```
@@ -291,7 +291,7 @@ SeleniumBase包括一个名为 <b><a href="https://seleniumbase.io/examples/mast
291291

292292
首先,为您打算使用的每个浏览器安装一个webdriver:
293293

294-
```bash
294+
```zsh
295295
seleniumbase install chromedriver
296296
seleniumbase install geckodriver
297297
seleniumbase install edgedriver
@@ -301,7 +301,7 @@ seleniumbase install operadriver
301301

302302
接着, 在 **pytest****nosetests** 中选择一个为您的测试启动器. (<i>可以互换.</i>)
303303

304-
```bash
304+
```zsh
305305
cd examples/
306306

307307
pytest my_first_test.py --browser=chrome
@@ -316,7 +316,7 @@ nosetests my_first_test.py --browser=firefox
316316

317317
如果示例测试运行得太快,您可以在**Demo模式**下运行它,方法是在命令行上添加``--Demo ``,它会在操作之间短暂地暂停浏览器,突出显示正在操作的页面元素,并让您实时了解测试断言的内容::
318318

319-
```bash
319+
```zsh
320320
pytest my_first_test.py --demo
321321
```
322322

@@ -326,7 +326,7 @@ Python 方法应以 ``test_``开头.
326326
Python类名可以是任何东西,因为SeleniumBase的`` BaseCase ``类继承自`` unittest ``的TestCase的类。
327327
你可以看到哪些测试是由`` pytest ``发现使用::
328328

329-
```bash
329+
```zsh
330330
pytest --collect-only -q
331331
```
332332

@@ -341,15 +341,15 @@ import pytest; pytest.set_trace() # Enter debugging mode. n = next, c = continu
341341

342342
<b>要暂停抛出异常或错误的活动测试,请添加``--pdb -s ``:</b>
343343

344-
```bash
344+
```zsh
345345
pytest my_first_test.py --pdb -s
346346
```
347347

348348
上面的代码将在出现故障时打开浏览器窗口。(pdb命令:'n', 'c', 's' => next, continue, step)。
349349

350350
下面是Pytest附带的一些有用的命令行选项:
351351

352-
```bash
352+
```zsh
353353
-v # Verbose mode. Prints the full name of each test and shows more details.
354354
-q # Quiet mode. Print fewer details in the console output when running tests.
355355
-x # Stop running the tests after the first failure is reached.
@@ -366,7 +366,7 @@ pytest my_first_test.py --pdb -s
366366

367367
SeleniumBase 为测试提供额外的Pytest命令行选项:
368368

369-
```bash
369+
```zsh
370370
--browser=BROWSER # (The web browser to use. Default: "chrome".)
371371
--chrome # (Shortcut for "--browser=chrome". On by default.)
372372
--edge # (Shortcut for "--browser=edge".)
@@ -465,7 +465,7 @@ SeleniumBase 为测试提供额外的Pytest命令行选项:
465465

466466
在测试失败期间,最近一次测试运行的日志和屏幕截图将被保存到``latest_logs/``文件夹中。如果在命令行选项中添加——archive_logs,或者在 [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py)中将``ARCHIVE_EXISTING_LOGS``设置为``True``,那么这些日志将被移动到``archived_logs/``。否则,将在下一次测试运行开始时清理日志文件。``test_suite.py``集合包含故意失败的测试,以便您可以看到日志记录是如何工作的。
467467

468-
```bash
468+
```zsh
469469
cd examples/
470470

471471
pytest test_suite.py --browser=chrome
@@ -487,7 +487,7 @@ pytest test_suite.py --browser=firefox
487487

488488
作为一个快捷方式,您可以运行`` seleniumbase mkdir [DIRECTORY_NAME] ``来创建一个新的文件夹,其中已经包含了必要的文件和一些可以运行的示例测试。例子:
489489

490-
```bash
490+
```zsh
491491
seleniumbase mkdir ui_tests
492492
cd ui_tests/
493493
pytest my_first_test.py
@@ -511,7 +511,7 @@ class MyTestClass(BaseCase):
511511

512512
你可以运行在``example``文件夹运行:
513513

514-
```bash
514+
```zsh
515515
pytest test_fail.py
516516
```
517517

@@ -527,23 +527,23 @@ pytest test_fail.py
527527

528528
使用 ``--html=report.html`` 在您的测试套件完成后,为您提供指定名称的漂亮报告。
529529

530-
```bash
530+
```zsh
531531
pytest test_suite.py --html=report.html
532532
```
533533

534534
<img src="https://seleniumbase.github.io/cdn/img/html_report.png" alt="Example Pytest Report" title="Example Pytest Report" width="520" />
535535

536536
还可以使用``--junit-xml=report``。获取一个xml报告。Jenkins可以使用这个文件为您的测试显示更好的报告。
537537

538-
```bash
538+
```zsh
539539
pytest test_suite.py --junit-xml=report.xml
540540
```
541541

542542
<h4><b>Nosetest 报告:</b></h4>
543543

544544
``--report`` 选项将在测试套件完成后为您提供一个漂亮的报告。
545545

546-
```bash
546+
```zsh
547547
nosetests test_suite.py --report
548548
```
549549

@@ -556,19 +556,19 @@ nosetests test_suite.py --report
556556

557557
如果您希望为您的浏览器测试使用代理服务器(仅适用于Chrome和Firefox),您可以在命令行上添加``--proxy=IP_ADDRESS:PORT ``作为参数。
558558

559-
```bash
559+
```zsh
560560
pytest proxy_test.py --proxy=IP_ADDRESS:PORT
561561
```
562562

563563
如果您希望使用的代理服务器需要身份验证,您可以执行以下操作 (Chrome only):
564564

565-
```bash
565+
```zsh
566566
pytest proxy_test.py --proxy=USERNAME:PASSWORD@IP_ADDRESS:PORT
567567
```
568568

569569
为了使事情更简单,您可以将您经常使用的代理添加到PROXY_LIST中 [proxy_list.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/proxy_list.py), 然后使用``--proxy=KEY_FROM_PROXY_LIST ``来使用该键的IP_ADDRESS:PORT
570570

571-
```bash
571+
```zsh
572572
pytest proxy_test.py --proxy=proxy1
573573
```
574574

@@ -577,7 +577,7 @@ pytest proxy_test.py --proxy=proxy1
577577

578578
如果您希望为您的浏览器测试更改用户代理(仅限Chrome和Firefox),您可以在命令行上添加``--agent="USER agent STRING" ``作为参数。
579579

580-
```bash
580+
```zsh
581581
pytest user_agent_test.py --agent="Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1.7412.EU"
582582
```
583583

@@ -604,7 +604,7 @@ pytest user_agent_test.py --agent="Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1
604604

605605
下面是一个启用了附加功能的测试运行示例:
606606

607-
```bash
607+
```zsh
608608
pytest [YOUR_TEST_FILE].py --with-db-reporting --with-s3-logging
609609
```
610610

@@ -920,15 +920,23 @@ pytest --reruns 5 --reruns-delay 1
920920
</p>
921921
<p><div><a href="https://github.com/mdmintz">https://github.com/mdmintz</a></div></p>
922922

923-
<div><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/super_logo_sb.png" title="SeleniumBase" width="290" /></a></div>
924923

925-
<div><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-22BBCC.svg" title="SeleniumBase" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/releases"><img src="https://img.shields.io/github/repo-size/seleniumbase/seleniumbase.svg" title="SeleniumBase" alt="Repo Size" /></a> <a href="https://gitter.im/seleniumbase/SeleniumBase"><img src="https://badges.gitter.im/seleniumbase/SeleniumBase.svg" title="SeleniumBase" alt="Join the chat!" /></a></div>
924+
<p align="left"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/sb_logo_10t.png" alt="SeleniumBase" title="SeleniumBase" width="274" /></a></p>
926925

927-
<div><a href="https://github.com/seleniumbase/SeleniumBase"><img src="https://img.shields.io/badge/tested%20with-SeleniumBase-04C38E.svg" alt="Tested with SeleniumBase" /></a> <a href="https://seleniumbase.io">
928-
<img src="https://img.shields.io/badge/docs-%20%20SeleniumBase.io-11BBDD.svg" alt="SeleniumBase.io Docs" /></a></div>
926+
<a href="https://pypi.org/project/seleniumbase/" target="_blank"><img src="https://img.shields.io/pypi/pyversions/seleniumbase.svg?color=22AAEE&logo=python&logoColor=FEDC54" title="Supported Python Versions" /></a>
929927

930-
<p><div><span><a href="https://github.com/seleniumbase/SeleniumBase"><img src="https://seleniumbase.github.io/img/social/share_github.svg" title="SeleniumBase on GitHub" alt="SeleniumBase on GitHub" width="56" /></a></span>
931-
<span><a href="https://gitter.im/seleniumbase/SeleniumBase"><img src="https://seleniumbase.github.io/img/social/share_gitter.svg" title="SeleniumBase on Gitter" alt="SeleniumBase on Gitter" width="44" /></a></span>
932-
<span><a href="https://twitter.com/seleniumbase"><img src="https://seleniumbase.github.io/img/social/share_twitter.svg" title="SeleniumBase on Twitter" alt="SeleniumBase on Twitter" width="60" /></a></span>
933-
<span><a href="https://instagram.com/seleniumbase"><img src="https://seleniumbase.github.io/img/social/share_instagram.svg" title="SeleniumBase on Instagram" alt="SeleniumBase on Instagram" width="52" /></a></span>
934-
<span><a href="https://www.facebook.com/SeleniumBase"><img src="https://seleniumbase.github.io/img/social/share_facebook.svg" title="SeleniumBase on Facebook" alt="SeleniumBase on Facebook" width="56" /></a></span></div></p>
928+
<p><div>
929+
<span><a href="https://www.youtube.com/playlist?list=PLp9uKicxkBc5UIlGi2BuE3aWC7JyXpD3m"><img src="https://seleniumbase.github.io/cdn/img/youtube.png" title="SeleniumBase Playlist on YouTube" alt="SeleniumBase Playlist on YouTube" width="70" /></a></span>
930+
<span><a href="https://github.com/seleniumbase/SeleniumBase"><img src="https://seleniumbase.github.io/img/social/share_github.svg" title="SeleniumBase on GitHub" alt="SeleniumBase on GitHub" width="64" /></a></span>
931+
<span><a href="https://discord.gg/EdhQTn3EyE"><img src="https://seleniumbase.github.io/other/discord_icon.png" title="SeleniumBase on Discord" alt="SeleniumBase on Discord" width="66" /></a></span>
932+
<span><a href="https://www.facebook.com/SeleniumBase"><img src="https://seleniumbase.io/img/social/share_facebook.svg" title="SeleniumBase on Facebook" alt="SeleniumBase on Facebook" width="62" /></a></span>
933+
</div></p>
934+
935+
<p><div><b><a href="https://github.com/mdmintz">https://github.com/mdmintz</a></b></div></p>
936+
937+
<div><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/super_logo_sb3.png" title="SeleniumBase" width="274" /></a></div>
938+
<div><a href="https://seleniumbase.io"><img src="https://img.shields.io/badge/docs-seleniumbase.io-11BBAA.svg" alt="SeleniumBase Docs" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-22BBCC.svg" title="SeleniumBase" /></a></div>
939+
<div><a href="https://github.com/seleniumbase/SeleniumBase"><img src="https://img.shields.io/badge/tested%20with-SeleniumBase-04C38E.svg" alt="Tested with SeleniumBase" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/stargazers"><img src="https://img.shields.io/github/stars/seleniumbase/seleniumbase.svg?color=19A57B" title="Stargazers" /></a></div>
940+
<div><a href="https://hellogithub.com/repository/c6be2d0f1969448697683d11a4ff915e" target="_blank"><img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=c6be2d0f1969448697683d11a4ff915e&claim_uid=xcrm4p9j3d6JCO5&theme=small" alt="Featured|HelloGitHub" /></a> <a href="https://discord.gg/EdhQTn3EyE" target="_blank"><img src="https://img.shields.io/discord/727927627830001734?color=7289DA&label=Discord&logo=discord&logoColor=white"/></a></div>
941+
<div><a href="https://pepy.tech/projects/seleniumbase?timeRange=threeMonths&category=version&includeCIDownloads=true&granularity=daily&viewType=line&versions=*" target="_blank"><img src="https://static.pepy.tech/badge/seleniumbase" alt="SeleniumBase PyPI downloads" /></a> <img src="https://views.whatilearened.today/views/github/seleniumbase/SeleniumBase.svg" width="98px" height="20px" alt="Views" /></div>
942+
<div align="left"></div>

help_docs/commander.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
🎖️ To launch it, call ``sbase commander`` or ``sbase gui``:
88

9-
```bash
9+
```zsh
1010
sbase gui
1111
* Starting the SeleniumBase Commander Desktop App...
1212
```
@@ -15,20 +15,20 @@ sbase gui
1515

1616
🎖️ <b translate="no">SeleniumBase Commander</b> loads the same tests that are found by:
1717

18-
```bash
18+
```zsh
1919
pytest --co -q
2020
```
2121

2222
🎖️ You can customize which tests are loaded by passing additional args:
2323

24-
```bash
24+
```zsh
2525
sbase commander [OPTIONAL PATH or TEST FILE]
2626
sbase gui [OPTIONAL PATH or TEST FILE]
2727
```
2828

2929
🎖️ Here are examples of customizing test collection:
3030

31-
```bash
31+
```zsh
3232
sbase gui
3333
sbase gui -k agent
3434
sbase gui -m marker2

seleniumbase/common/ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Often in your tests, you may need to login to a website to perform testing. This
4444

4545
* Next, use [obfuscate.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/common/obfuscate.py) to obfuscate/encrypt passwords into coded strings:
4646

47-
```bash
47+
```zsh
4848
python obfuscate.py
4949

5050
Enter password to obfuscate: (CTRL+C to exit)

seleniumbase/drivers/ReadMe.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ To run web automation, you'll need webdrivers for each browser you plan on using
66

77
🎛️ You can also download drivers manually with these commands:
88

9-
```bash
9+
```zsh
1010
seleniumbase get chromedriver
1111
seleniumbase get geckodriver
1212
seleniumbase get edgedriver
@@ -18,7 +18,7 @@ If the necessary driver is not found in this location while running tests, Selen
1818

1919
🎛️ You can also download specific versions of drivers. Examples:
2020

21-
```bash
21+
```zsh
2222
sbase get chromedriver 114
2323
sbase get chromedriver 114.0.5735.90
2424
sbase get chromedriver stable
@@ -38,7 +38,7 @@ sbase get edgedriver 115.0.1901.183
3838

3939
🎛️ Use the `sbase get` command to download the `Chrome for Testing` and `Chrome-Headless-Shell` browser binaries. Example:
4040

41-
```bash
41+
```zsh
4242
sbase get cft # (For `Chrome for Testing`)
4343
sbase get chs # (For `Chrome-Headless-Shell`)
4444
```

0 commit comments

Comments
 (0)