seleniumbase 4.40.0__tar.gz → 4.40.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {seleniumbase-4.40.0/seleniumbase.egg-info → seleniumbase-4.40.1}/PKG-INFO +42 -42
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/README.md +40 -40
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/requirements.txt +1 -1
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/__version__.py +1 -1
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/browser_launcher.py +1 -1
- {seleniumbase-4.40.0 → seleniumbase-4.40.1/seleniumbase.egg-info}/PKG-INFO +42 -42
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase.egg-info/requires.txt +1 -1
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/setup.py +1 -1
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/.gitignore +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/LICENSE +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/MANIFEST.in +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/install.sh +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/pyproject.toml +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/pytest.ini +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/sbase/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/sbase/__main__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/sbase/steps.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/__main__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/behave/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/behave/behave_helper.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/behave/behave_sb.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/behave/steps.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/common/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/common/decorators.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/common/encryption.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/common/exceptions.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/common/obfuscate.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/common/unobfuscate.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/config/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/config/ad_block_list.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/config/proxy_list.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/config/settings.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/logo_helper.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/rich_helper.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/run.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/sb_behave_gui.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/sb_caseplans.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/sb_commander.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/sb_install.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/sb_mkchart.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/sb_mkdir.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/sb_mkfile.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/sb_mkpres.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/sb_mkrec.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/sb_objectify.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/sb_print.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/console_scripts/sb_recorder.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/application_manager.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/capabilities_parser.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/colored_traceback.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/create_db_tables.sql +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/detect_b_ver.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/download_helper.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/encoded_images.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/jqc_helper.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/log_helper.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/mysql.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/proxy_helper.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/recorder_helper.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/report_helper.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/s3_manager.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/sb_cdp.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/sb_driver.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/session_helper.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/settings_parser.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/style_sheet.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/testcase_manager.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/tour_helper.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/core/visual_helper.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/drivers/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/drivers/cft_drivers/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/drivers/chs_drivers/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/extensions/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/extensions/ad_block.zip +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/extensions/disable_csp.zip +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/extensions/recorder.zip +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/extensions/sbase_ext.zip +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/fixtures/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/fixtures/base_case.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/fixtures/constants.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/fixtures/css_to_xpath.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/fixtures/errors.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/fixtures/js_utils.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/fixtures/page_actions.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/fixtures/page_utils.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/fixtures/shared_utils.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/fixtures/unittest_helper.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/fixtures/words.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/fixtures/xpath_to_css.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/js_code/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/js_code/active_css_js.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/js_code/live_js.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/js_code/recorder_js.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/masterqa/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/masterqa/master_qa.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/plugins/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/plugins/base_plugin.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/plugins/basic_test_info.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/plugins/db_reporting_plugin.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/plugins/driver_manager.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/plugins/page_source.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/plugins/pytest_plugin.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/plugins/s3_logging_plugin.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/plugins/sb_manager.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/plugins/screen_shots.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/plugins/selenium_plugin.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/resources/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/translate/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/translate/chinese.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/translate/dutch.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/translate/french.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/translate/italian.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/translate/japanese.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/translate/korean.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/translate/master_dict.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/translate/portuguese.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/translate/russian.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/translate/spanish.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/translate/translator.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/cdp.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/cdp_driver/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/cdp_driver/_contradict.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/cdp_driver/browser.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/cdp_driver/cdp_util.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/cdp_driver/config.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/cdp_driver/connection.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/cdp_driver/element.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/cdp_driver/tab.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/dprocess.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/options.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/patcher.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/reactor.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/undetected/webelement.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/utilities/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/utilities/selenium_grid/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/utilities/selenium_grid/download_selenium_server.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/utilities/selenium_grid/font_color +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/utilities/selenium_grid/grid-hub +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/utilities/selenium_grid/grid-node +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/utilities/selenium_grid/grid_hub.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/utilities/selenium_grid/grid_node.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/utilities/selenium_grid/register-grid-node.bat +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/utilities/selenium_grid/register-grid-node.sh +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/utilities/selenium_grid/start-grid-hub.bat +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/utilities/selenium_grid/start-grid-hub.sh +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/utilities/selenium_ide/__init__.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase/utilities/selenium_ide/convert_ide.py +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase.egg-info/SOURCES.txt +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase.egg-info/dependency_links.txt +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase.egg-info/entry_points.txt +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/seleniumbase.egg-info/top_level.txt +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/setup.cfg +0 -0
- {seleniumbase-4.40.0 → seleniumbase-4.40.1}/virtualenv_install.sh +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.40.
|
3
|
+
Version: 4.40.1
|
4
4
|
Summary: A complete web automation framework for end-to-end testing.
|
5
5
|
Home-page: https://github.com/seleniumbase/SeleniumBase
|
6
6
|
Author: Michael Mintz
|
@@ -108,7 +108,7 @@ Requires-Dist: wsproto==1.2.0
|
|
108
108
|
Requires-Dist: websocket-client==1.8.0
|
109
109
|
Requires-Dist: selenium==4.27.1; python_version < "3.9"
|
110
110
|
Requires-Dist: selenium==4.32.0; python_version >= "3.9" and python_version < "3.10"
|
111
|
-
Requires-Dist: selenium==4.34.
|
111
|
+
Requires-Dist: selenium==4.34.1; python_version >= "3.10"
|
112
112
|
Requires-Dist: cssselect==1.2.0; python_version < "3.9"
|
113
113
|
Requires-Dist: cssselect==1.3.0; python_version >= "3.9"
|
114
114
|
Requires-Dist: sortedcontainers==2.4.0
|
@@ -339,7 +339,7 @@ class MyTestClass(BaseCase):
|
|
339
339
|
|
340
340
|
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_coffee_cart.py" target="_blank">test_coffee_cart.py</a>, which verifies an e-commerce site:</p>
|
341
341
|
|
342
|
-
```
|
342
|
+
```zsh
|
343
343
|
pytest test_coffee_cart.py --demo
|
344
344
|
```
|
345
345
|
|
@@ -353,7 +353,7 @@ pytest test_coffee_cart.py --demo
|
|
353
353
|
|
354
354
|
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py" target="_blank">test_demo_site.py</a>, which covers several actions:</p>
|
355
355
|
|
356
|
-
```
|
356
|
+
```zsh
|
357
357
|
pytest test_demo_site.py
|
358
358
|
```
|
359
359
|
|
@@ -501,7 +501,7 @@ finally:
|
|
501
501
|
|
502
502
|
🔵 **How to install ``seleniumbase`` from PyPI:**
|
503
503
|
|
504
|
-
```
|
504
|
+
```zsh
|
505
505
|
pip install seleniumbase
|
506
506
|
```
|
507
507
|
|
@@ -511,7 +511,7 @@ pip install seleniumbase
|
|
511
511
|
|
512
512
|
🔵 **How to install ``seleniumbase`` from a GitHub clone:**
|
513
513
|
|
514
|
-
```
|
514
|
+
```zsh
|
515
515
|
git clone https://github.com/seleniumbase/SeleniumBase.git
|
516
516
|
cd SeleniumBase/
|
517
517
|
pip install -e .
|
@@ -519,14 +519,14 @@ pip install -e .
|
|
519
519
|
|
520
520
|
🔵 **How to upgrade an existing install from a GitHub clone:**
|
521
521
|
|
522
|
-
```
|
522
|
+
```zsh
|
523
523
|
git pull
|
524
524
|
pip install -e .
|
525
525
|
```
|
526
526
|
|
527
527
|
🔵 **Type ``seleniumbase`` or ``sbase`` to verify that SeleniumBase was installed successfully:**
|
528
528
|
|
529
|
-
```
|
529
|
+
```zsh
|
530
530
|
___ _ _ ___
|
531
531
|
/ __| ___| |___ _ _ (_)_ _ _ __ | _ ) __ _ ______
|
532
532
|
\__ \/ -_) / -_) ' \| | \| | ' \ | _ \/ _` (_-< -_)
|
@@ -580,7 +580,7 @@ pip install -e .
|
|
580
580
|
<details>
|
581
581
|
<summary> ▶️ Here's sample output from a chromedriver download. (<b>click to expand</b>)</summary>
|
582
582
|
|
583
|
-
```
|
583
|
+
```zsh
|
584
584
|
*** chromedriver to download = 131.0.6778.108 (Latest Stable)
|
585
585
|
|
586
586
|
Downloading chromedriver-mac-arm64.zip from:
|
@@ -608,7 +608,7 @@ Making [chromedriver 131.0.6778.108] executable ...
|
|
608
608
|
|
609
609
|
<p align="left">Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</p>
|
610
610
|
|
611
|
-
```
|
611
|
+
```zsh
|
612
612
|
cd examples/
|
613
613
|
pytest my_first_test.py
|
614
614
|
```
|
@@ -709,7 +709,7 @@ self.type("input", "dogs\n") # (The "\n" presses ENTER)
|
|
709
709
|
|
710
710
|
Most SeleniumBase scripts can be run with <code translate="no">pytest</code>, <code translate="no">pynose</code>, or pure <code translate="no">python</code>. Not all test runners can run all test formats. For example, tests that use the ``sb`` pytest fixture can only be run with ``pytest``. (See <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a>) There's also a <a href="https://behave.readthedocs.io/en/stable/gherkin.html#features" target="_blank">Gherkin</a> test format that runs with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md">behave</a>.
|
711
711
|
|
712
|
-
```
|
712
|
+
```zsh
|
713
713
|
pytest coffee_cart_tests.py --rs
|
714
714
|
pytest test_sb_fixture.py --demo
|
715
715
|
pytest test_suite.py --rs --html=report.html --dashboard
|
@@ -733,13 +733,13 @@ With a SeleniumBase [pytest.ini](https://github.com/seleniumbase/SeleniumBase/bl
|
|
733
733
|
|
734
734
|
<p>✅ You can do a pre-flight check to see which tests would get discovered by <code translate="no">pytest</code> before the actual run:</p>
|
735
735
|
|
736
|
-
```
|
736
|
+
```zsh
|
737
737
|
pytest --co -q
|
738
738
|
```
|
739
739
|
|
740
740
|
<p>✅ You can be more specific when calling <code translate="no">pytest</code> or <code translate="no">pynose</code> on a file:</p>
|
741
741
|
|
742
|
-
```
|
742
|
+
```zsh
|
743
743
|
pytest [FILE_NAME.py]::[CLASS_NAME]::[METHOD_NAME]
|
744
744
|
|
745
745
|
pynose [FILE_NAME.py]:[CLASS_NAME].[METHOD_NAME]
|
@@ -767,7 +767,7 @@ pynose [FILE_NAME.py]:[CLASS_NAME].[METHOD_NAME]
|
|
767
767
|
|
768
768
|
🔵 <b>Demo Mode</b> helps you see what a test is doing. If a test is moving too fast for your eyes, run it in <b>Demo Mode</b> to pause the browser briefly between actions, highlight page elements being acted on, and display assertions:
|
769
769
|
|
770
|
-
```
|
770
|
+
```zsh
|
771
771
|
pytest my_first_test.py --demo
|
772
772
|
```
|
773
773
|
|
@@ -789,13 +789,13 @@ breakpoint() # Shortcut for "import pdb; pdb.set_trace()"
|
|
789
789
|
|
790
790
|
🔵 To pause an active test that throws an exception or error, (*and keep the browser window open while **Debug Mode** begins in the console*), add **``--pdb``** as a ``pytest`` option:
|
791
791
|
|
792
|
-
```
|
792
|
+
```zsh
|
793
793
|
pytest test_fail.py --pdb
|
794
794
|
```
|
795
795
|
|
796
796
|
🔵 To start tests in Debug Mode, add **``--trace``** as a ``pytest`` option:
|
797
797
|
|
798
|
-
```
|
798
|
+
```zsh
|
799
799
|
pytest test_coffee_cart.py --trace
|
800
800
|
```
|
801
801
|
|
@@ -808,7 +808,7 @@ pytest test_coffee_cart.py --trace
|
|
808
808
|
<a id="pytest_options"></a>
|
809
809
|
✅ Here are some useful command-line options that come with <code translate="no">pytest</code>:
|
810
810
|
|
811
|
-
```
|
811
|
+
```zsh
|
812
812
|
-v # Verbose mode. Prints the full name of each test and shows more details.
|
813
813
|
-q # Quiet mode. Print fewer details in the console output when running tests.
|
814
814
|
-x # Stop running the tests after the first failure is reached.
|
@@ -826,7 +826,7 @@ pytest test_coffee_cart.py --trace
|
|
826
826
|
<a id="new_pytest_options"></a>
|
827
827
|
✅ SeleniumBase provides additional <code translate="no">pytest</code> command-line options for tests:
|
828
828
|
|
829
|
-
```
|
829
|
+
```zsh
|
830
830
|
--browser=BROWSER # (The web browser to use. Default: "chrome".)
|
831
831
|
--chrome # (Shortcut for "--browser=chrome". On by default.)
|
832
832
|
--edge # (Shortcut for "--browser=edge".)
|
@@ -936,7 +936,7 @@ pytest test_coffee_cart.py --trace
|
|
936
936
|
|
937
937
|
🔵 During test failures, logs and screenshots from the most recent test run will get saved to the ``latest_logs/`` folder. Those logs will get moved to ``archived_logs/`` if you add --archive_logs to command-line options, or have ``ARCHIVE_EXISTING_LOGS`` set to True in [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py), otherwise log files with be cleaned up at the start of the next test run. The ``test_suite.py`` collection contains tests that fail on purpose so that you can see how logging works.
|
938
938
|
|
939
|
-
```
|
939
|
+
```zsh
|
940
940
|
cd examples/
|
941
941
|
|
942
942
|
pytest test_suite.py --chrome
|
@@ -959,13 +959,13 @@ Inside your tests, you can use ``self.data`` to access that.
|
|
959
959
|
|
960
960
|
🔵 ``sbase mkdir DIR`` creates a folder with config files and sample tests:
|
961
961
|
|
962
|
-
```
|
962
|
+
```zsh
|
963
963
|
sbase mkdir ui_tests
|
964
964
|
```
|
965
965
|
|
966
966
|
> That new folder will have these files:
|
967
967
|
|
968
|
-
```
|
968
|
+
```zsh
|
969
969
|
ui_tests/
|
970
970
|
├── __init__.py
|
971
971
|
├── my_first_test.py
|
@@ -991,13 +991,13 @@ ui_tests/
|
|
991
991
|
|
992
992
|
<b>ProTip™:</b> You can also create a boilerplate folder without any sample tests in it by adding ``-b`` or ``--basic`` to the ``sbase mkdir`` command:
|
993
993
|
|
994
|
-
```
|
994
|
+
```zsh
|
995
995
|
sbase mkdir ui_tests --basic
|
996
996
|
```
|
997
997
|
|
998
998
|
> That new folder will have these files:
|
999
999
|
|
1000
|
-
```
|
1000
|
+
```zsh
|
1001
1001
|
ui_tests/
|
1002
1002
|
├── __init__.py
|
1003
1003
|
├── pytest.ini
|
@@ -1027,7 +1027,7 @@ class MyTestClass(BaseCase):
|
|
1027
1027
|
|
1028
1028
|
You can run it from the ``examples/`` folder like this:
|
1029
1029
|
|
1030
|
-
```
|
1030
|
+
```zsh
|
1031
1031
|
pytest test_fail.py
|
1032
1032
|
```
|
1033
1033
|
|
@@ -1040,7 +1040,7 @@ pytest test_fail.py
|
|
1040
1040
|
|
1041
1041
|
🔵 The ``--dashboard`` option for pytest generates a SeleniumBase Dashboard located at ``dashboard.html``, which updates automatically as tests run and produce results. Example:
|
1042
1042
|
|
1043
|
-
```
|
1043
|
+
```zsh
|
1044
1044
|
pytest --dashboard --rs --headless
|
1045
1045
|
```
|
1046
1046
|
|
@@ -1048,7 +1048,7 @@ pytest --dashboard --rs --headless
|
|
1048
1048
|
|
1049
1049
|
🔵 Additionally, you can host your own SeleniumBase Dashboard Server on a port of your choice. Here's an example of that using Python's ``http.server``:
|
1050
1050
|
|
1051
|
-
```
|
1051
|
+
```zsh
|
1052
1052
|
python -m http.server 1948
|
1053
1053
|
```
|
1054
1054
|
|
@@ -1056,7 +1056,7 @@ python -m http.server 1948
|
|
1056
1056
|
|
1057
1057
|
🔵 Here's a full example of what the SeleniumBase Dashboard may look like:
|
1058
1058
|
|
1059
|
-
```
|
1059
|
+
```zsh
|
1060
1060
|
pytest test_suite.py test_image_saving.py --dashboard --rs --headless
|
1061
1061
|
```
|
1062
1062
|
|
@@ -1071,7 +1071,7 @@ pytest test_suite.py test_image_saving.py --dashboard --rs --headless
|
|
1071
1071
|
|
1072
1072
|
✅ Using ``--html=report.html`` gives you a fancy report of the name specified after your test suite completes.
|
1073
1073
|
|
1074
|
-
```
|
1074
|
+
```zsh
|
1075
1075
|
pytest test_suite.py --html=report.html
|
1076
1076
|
```
|
1077
1077
|
|
@@ -1081,7 +1081,7 @@ pytest test_suite.py --html=report.html
|
|
1081
1081
|
|
1082
1082
|
✅ Here's an example of an upgraded html report:
|
1083
1083
|
|
1084
|
-
```
|
1084
|
+
```zsh
|
1085
1085
|
pytest test_suite.py --dashboard --html=report.html
|
1086
1086
|
```
|
1087
1087
|
|
@@ -1091,7 +1091,7 @@ If viewing pytest html reports in [Jenkins](https://www.jenkins.io/), you may ne
|
|
1091
1091
|
|
1092
1092
|
You can also use ``--junit-xml=report.xml`` to get an xml report instead. Jenkins can use this file to display better reporting for your tests.
|
1093
1093
|
|
1094
|
-
```
|
1094
|
+
```zsh
|
1095
1095
|
pytest test_suite.py --junit-xml=report.xml
|
1096
1096
|
```
|
1097
1097
|
|
@@ -1099,7 +1099,7 @@ pytest test_suite.py --junit-xml=report.xml
|
|
1099
1099
|
|
1100
1100
|
The ``--report`` option gives you a fancy report after your test suite completes.
|
1101
1101
|
|
1102
|
-
```
|
1102
|
+
```zsh
|
1103
1103
|
pynose test_suite.py --report
|
1104
1104
|
```
|
1105
1105
|
|
@@ -1111,7 +1111,7 @@ pynose test_suite.py --report
|
|
1111
1111
|
|
1112
1112
|
(The [behave_bdd/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples/behave_bdd) folder can be found in the [examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) folder.)
|
1113
1113
|
|
1114
|
-
```
|
1114
|
+
```zsh
|
1115
1115
|
behave behave_bdd/features/ -D dashboard -D headless
|
1116
1116
|
```
|
1117
1117
|
|
@@ -1119,7 +1119,7 @@ behave behave_bdd/features/ -D dashboard -D headless
|
|
1119
1119
|
|
1120
1120
|
You can also use ``--junit`` to get ``.xml`` reports for each <code translate="no">behave</code> feature. Jenkins can use these files to display better reporting for your tests.
|
1121
1121
|
|
1122
|
-
```
|
1122
|
+
```zsh
|
1123
1123
|
behave behave_bdd/features/ --junit -D rs -D headless
|
1124
1124
|
```
|
1125
1125
|
|
@@ -1129,13 +1129,13 @@ See: [https://allurereport.org/docs/pytest/](https://allurereport.org/docs/pytes
|
|
1129
1129
|
|
1130
1130
|
SeleniumBase no longer includes ``allure-pytest`` as part of installed dependencies. If you want to use it, install it first:
|
1131
1131
|
|
1132
|
-
```
|
1132
|
+
```zsh
|
1133
1133
|
pip install allure-pytest
|
1134
1134
|
```
|
1135
1135
|
|
1136
1136
|
Now your tests can create Allure results files, which can be processed by Allure Reports.
|
1137
1137
|
|
1138
|
-
```
|
1138
|
+
```zsh
|
1139
1139
|
pytest test_suite.py --alluredir=allure_results
|
1140
1140
|
```
|
1141
1141
|
|
@@ -1145,19 +1145,19 @@ pytest test_suite.py --alluredir=allure_results
|
|
1145
1145
|
|
1146
1146
|
If you wish to use a proxy server for your browser tests (Chromium or Firefox), you can add ``--proxy=IP_ADDRESS:PORT`` as an argument on the command line.
|
1147
1147
|
|
1148
|
-
```
|
1148
|
+
```zsh
|
1149
1149
|
pytest proxy_test.py --proxy=IP_ADDRESS:PORT
|
1150
1150
|
```
|
1151
1151
|
|
1152
1152
|
If the proxy server that you wish to use requires authentication, you can do the following (Chromium only):
|
1153
1153
|
|
1154
|
-
```
|
1154
|
+
```zsh
|
1155
1155
|
pytest proxy_test.py --proxy=USERNAME:PASSWORD@IP_ADDRESS:PORT
|
1156
1156
|
```
|
1157
1157
|
|
1158
1158
|
SeleniumBase also supports SOCKS4 and SOCKS5 proxies:
|
1159
1159
|
|
1160
|
-
```
|
1160
|
+
```zsh
|
1161
1161
|
pytest proxy_test.py --proxy="socks4://IP_ADDRESS:PORT"
|
1162
1162
|
|
1163
1163
|
pytest proxy_test.py --proxy="socks5://IP_ADDRESS:PORT"
|
@@ -1165,7 +1165,7 @@ pytest proxy_test.py --proxy="socks5://IP_ADDRESS:PORT"
|
|
1165
1165
|
|
1166
1166
|
To make things easier, you can add your frequently-used proxies to PROXY_LIST in [proxy_list.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/proxy_list.py), and then use ``--proxy=KEY_FROM_PROXY_LIST`` to use the IP_ADDRESS:PORT of that key.
|
1167
1167
|
|
1168
|
-
```
|
1168
|
+
```zsh
|
1169
1169
|
pytest proxy_test.py --proxy=proxy1
|
1170
1170
|
```
|
1171
1171
|
|
@@ -1174,7 +1174,7 @@ pytest proxy_test.py --proxy=proxy1
|
|
1174
1174
|
|
1175
1175
|
🔵 If you wish to change the User-Agent for your browser tests (Chromium and Firefox only), you can add ``--agent="USER AGENT STRING"`` as an argument on the command-line.
|
1176
1176
|
|
1177
|
-
```
|
1177
|
+
```zsh
|
1178
1178
|
pytest user_agent_test.py --agent="Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1.7412.EU"
|
1179
1179
|
```
|
1180
1180
|
|
@@ -1212,7 +1212,7 @@ pytest user_agent_test.py --agent="Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1
|
|
1212
1212
|
|
1213
1213
|
Here's an example of running tests with some additional features enabled:
|
1214
1214
|
|
1215
|
-
```
|
1215
|
+
```zsh
|
1216
1216
|
pytest [YOUR_TEST_FILE.py] --with-db-reporting --with-s3-logging
|
1217
1217
|
```
|
1218
1218
|
|
@@ -1559,7 +1559,7 @@ self.driver.find_elements("partial link text", "GitHub")
|
|
1559
1559
|
|
1560
1560
|
<p>You can use <code translate="no">pytest --reruns=NUM</code> to retry failing tests that many times. Add <code translate="no">--reruns-delay=SECONDS</code> to wait that many seconds between retries. Example:</p>
|
1561
1561
|
|
1562
|
-
```
|
1562
|
+
```zsh
|
1563
1563
|
pytest --reruns=1 --reruns-delay=1
|
1564
1564
|
```
|
1565
1565
|
|
@@ -134,7 +134,7 @@ class MyTestClass(BaseCase):
|
|
134
134
|
|
135
135
|
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_coffee_cart.py" target="_blank">test_coffee_cart.py</a>, which verifies an e-commerce site:</p>
|
136
136
|
|
137
|
-
```
|
137
|
+
```zsh
|
138
138
|
pytest test_coffee_cart.py --demo
|
139
139
|
```
|
140
140
|
|
@@ -148,7 +148,7 @@ pytest test_coffee_cart.py --demo
|
|
148
148
|
|
149
149
|
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py" target="_blank">test_demo_site.py</a>, which covers several actions:</p>
|
150
150
|
|
151
|
-
```
|
151
|
+
```zsh
|
152
152
|
pytest test_demo_site.py
|
153
153
|
```
|
154
154
|
|
@@ -296,7 +296,7 @@ finally:
|
|
296
296
|
|
297
297
|
🔵 **How to install ``seleniumbase`` from PyPI:**
|
298
298
|
|
299
|
-
```
|
299
|
+
```zsh
|
300
300
|
pip install seleniumbase
|
301
301
|
```
|
302
302
|
|
@@ -306,7 +306,7 @@ pip install seleniumbase
|
|
306
306
|
|
307
307
|
🔵 **How to install ``seleniumbase`` from a GitHub clone:**
|
308
308
|
|
309
|
-
```
|
309
|
+
```zsh
|
310
310
|
git clone https://github.com/seleniumbase/SeleniumBase.git
|
311
311
|
cd SeleniumBase/
|
312
312
|
pip install -e .
|
@@ -314,14 +314,14 @@ pip install -e .
|
|
314
314
|
|
315
315
|
🔵 **How to upgrade an existing install from a GitHub clone:**
|
316
316
|
|
317
|
-
```
|
317
|
+
```zsh
|
318
318
|
git pull
|
319
319
|
pip install -e .
|
320
320
|
```
|
321
321
|
|
322
322
|
🔵 **Type ``seleniumbase`` or ``sbase`` to verify that SeleniumBase was installed successfully:**
|
323
323
|
|
324
|
-
```
|
324
|
+
```zsh
|
325
325
|
___ _ _ ___
|
326
326
|
/ __| ___| |___ _ _ (_)_ _ _ __ | _ ) __ _ ______
|
327
327
|
\__ \/ -_) / -_) ' \| | \| | ' \ | _ \/ _` (_-< -_)
|
@@ -375,7 +375,7 @@ pip install -e .
|
|
375
375
|
<details>
|
376
376
|
<summary> ▶️ Here's sample output from a chromedriver download. (<b>click to expand</b>)</summary>
|
377
377
|
|
378
|
-
```
|
378
|
+
```zsh
|
379
379
|
*** chromedriver to download = 131.0.6778.108 (Latest Stable)
|
380
380
|
|
381
381
|
Downloading chromedriver-mac-arm64.zip from:
|
@@ -403,7 +403,7 @@ Making [chromedriver 131.0.6778.108] executable ...
|
|
403
403
|
|
404
404
|
<p align="left">Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</p>
|
405
405
|
|
406
|
-
```
|
406
|
+
```zsh
|
407
407
|
cd examples/
|
408
408
|
pytest my_first_test.py
|
409
409
|
```
|
@@ -504,7 +504,7 @@ self.type("input", "dogs\n") # (The "\n" presses ENTER)
|
|
504
504
|
|
505
505
|
Most SeleniumBase scripts can be run with <code translate="no">pytest</code>, <code translate="no">pynose</code>, or pure <code translate="no">python</code>. Not all test runners can run all test formats. For example, tests that use the ``sb`` pytest fixture can only be run with ``pytest``. (See <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a>) There's also a <a href="https://behave.readthedocs.io/en/stable/gherkin.html#features" target="_blank">Gherkin</a> test format that runs with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md">behave</a>.
|
506
506
|
|
507
|
-
```
|
507
|
+
```zsh
|
508
508
|
pytest coffee_cart_tests.py --rs
|
509
509
|
pytest test_sb_fixture.py --demo
|
510
510
|
pytest test_suite.py --rs --html=report.html --dashboard
|
@@ -528,13 +528,13 @@ With a SeleniumBase [pytest.ini](https://github.com/seleniumbase/SeleniumBase/bl
|
|
528
528
|
|
529
529
|
<p>✅ You can do a pre-flight check to see which tests would get discovered by <code translate="no">pytest</code> before the actual run:</p>
|
530
530
|
|
531
|
-
```
|
531
|
+
```zsh
|
532
532
|
pytest --co -q
|
533
533
|
```
|
534
534
|
|
535
535
|
<p>✅ You can be more specific when calling <code translate="no">pytest</code> or <code translate="no">pynose</code> on a file:</p>
|
536
536
|
|
537
|
-
```
|
537
|
+
```zsh
|
538
538
|
pytest [FILE_NAME.py]::[CLASS_NAME]::[METHOD_NAME]
|
539
539
|
|
540
540
|
pynose [FILE_NAME.py]:[CLASS_NAME].[METHOD_NAME]
|
@@ -562,7 +562,7 @@ pynose [FILE_NAME.py]:[CLASS_NAME].[METHOD_NAME]
|
|
562
562
|
|
563
563
|
🔵 <b>Demo Mode</b> helps you see what a test is doing. If a test is moving too fast for your eyes, run it in <b>Demo Mode</b> to pause the browser briefly between actions, highlight page elements being acted on, and display assertions:
|
564
564
|
|
565
|
-
```
|
565
|
+
```zsh
|
566
566
|
pytest my_first_test.py --demo
|
567
567
|
```
|
568
568
|
|
@@ -584,13 +584,13 @@ breakpoint() # Shortcut for "import pdb; pdb.set_trace()"
|
|
584
584
|
|
585
585
|
🔵 To pause an active test that throws an exception or error, (*and keep the browser window open while **Debug Mode** begins in the console*), add **``--pdb``** as a ``pytest`` option:
|
586
586
|
|
587
|
-
```
|
587
|
+
```zsh
|
588
588
|
pytest test_fail.py --pdb
|
589
589
|
```
|
590
590
|
|
591
591
|
🔵 To start tests in Debug Mode, add **``--trace``** as a ``pytest`` option:
|
592
592
|
|
593
|
-
```
|
593
|
+
```zsh
|
594
594
|
pytest test_coffee_cart.py --trace
|
595
595
|
```
|
596
596
|
|
@@ -603,7 +603,7 @@ pytest test_coffee_cart.py --trace
|
|
603
603
|
<a id="pytest_options"></a>
|
604
604
|
✅ Here are some useful command-line options that come with <code translate="no">pytest</code>:
|
605
605
|
|
606
|
-
```
|
606
|
+
```zsh
|
607
607
|
-v # Verbose mode. Prints the full name of each test and shows more details.
|
608
608
|
-q # Quiet mode. Print fewer details in the console output when running tests.
|
609
609
|
-x # Stop running the tests after the first failure is reached.
|
@@ -621,7 +621,7 @@ pytest test_coffee_cart.py --trace
|
|
621
621
|
<a id="new_pytest_options"></a>
|
622
622
|
✅ SeleniumBase provides additional <code translate="no">pytest</code> command-line options for tests:
|
623
623
|
|
624
|
-
```
|
624
|
+
```zsh
|
625
625
|
--browser=BROWSER # (The web browser to use. Default: "chrome".)
|
626
626
|
--chrome # (Shortcut for "--browser=chrome". On by default.)
|
627
627
|
--edge # (Shortcut for "--browser=edge".)
|
@@ -731,7 +731,7 @@ pytest test_coffee_cart.py --trace
|
|
731
731
|
|
732
732
|
🔵 During test failures, logs and screenshots from the most recent test run will get saved to the ``latest_logs/`` folder. Those logs will get moved to ``archived_logs/`` if you add --archive_logs to command-line options, or have ``ARCHIVE_EXISTING_LOGS`` set to True in [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py), otherwise log files with be cleaned up at the start of the next test run. The ``test_suite.py`` collection contains tests that fail on purpose so that you can see how logging works.
|
733
733
|
|
734
|
-
```
|
734
|
+
```zsh
|
735
735
|
cd examples/
|
736
736
|
|
737
737
|
pytest test_suite.py --chrome
|
@@ -754,13 +754,13 @@ Inside your tests, you can use ``self.data`` to access that.
|
|
754
754
|
|
755
755
|
🔵 ``sbase mkdir DIR`` creates a folder with config files and sample tests:
|
756
756
|
|
757
|
-
```
|
757
|
+
```zsh
|
758
758
|
sbase mkdir ui_tests
|
759
759
|
```
|
760
760
|
|
761
761
|
> That new folder will have these files:
|
762
762
|
|
763
|
-
```
|
763
|
+
```zsh
|
764
764
|
ui_tests/
|
765
765
|
├── __init__.py
|
766
766
|
├── my_first_test.py
|
@@ -786,13 +786,13 @@ ui_tests/
|
|
786
786
|
|
787
787
|
<b>ProTip™:</b> You can also create a boilerplate folder without any sample tests in it by adding ``-b`` or ``--basic`` to the ``sbase mkdir`` command:
|
788
788
|
|
789
|
-
```
|
789
|
+
```zsh
|
790
790
|
sbase mkdir ui_tests --basic
|
791
791
|
```
|
792
792
|
|
793
793
|
> That new folder will have these files:
|
794
794
|
|
795
|
-
```
|
795
|
+
```zsh
|
796
796
|
ui_tests/
|
797
797
|
├── __init__.py
|
798
798
|
├── pytest.ini
|
@@ -822,7 +822,7 @@ class MyTestClass(BaseCase):
|
|
822
822
|
|
823
823
|
You can run it from the ``examples/`` folder like this:
|
824
824
|
|
825
|
-
```
|
825
|
+
```zsh
|
826
826
|
pytest test_fail.py
|
827
827
|
```
|
828
828
|
|
@@ -835,7 +835,7 @@ pytest test_fail.py
|
|
835
835
|
|
836
836
|
🔵 The ``--dashboard`` option for pytest generates a SeleniumBase Dashboard located at ``dashboard.html``, which updates automatically as tests run and produce results. Example:
|
837
837
|
|
838
|
-
```
|
838
|
+
```zsh
|
839
839
|
pytest --dashboard --rs --headless
|
840
840
|
```
|
841
841
|
|
@@ -843,7 +843,7 @@ pytest --dashboard --rs --headless
|
|
843
843
|
|
844
844
|
🔵 Additionally, you can host your own SeleniumBase Dashboard Server on a port of your choice. Here's an example of that using Python's ``http.server``:
|
845
845
|
|
846
|
-
```
|
846
|
+
```zsh
|
847
847
|
python -m http.server 1948
|
848
848
|
```
|
849
849
|
|
@@ -851,7 +851,7 @@ python -m http.server 1948
|
|
851
851
|
|
852
852
|
🔵 Here's a full example of what the SeleniumBase Dashboard may look like:
|
853
853
|
|
854
|
-
```
|
854
|
+
```zsh
|
855
855
|
pytest test_suite.py test_image_saving.py --dashboard --rs --headless
|
856
856
|
```
|
857
857
|
|
@@ -866,7 +866,7 @@ pytest test_suite.py test_image_saving.py --dashboard --rs --headless
|
|
866
866
|
|
867
867
|
✅ Using ``--html=report.html`` gives you a fancy report of the name specified after your test suite completes.
|
868
868
|
|
869
|
-
```
|
869
|
+
```zsh
|
870
870
|
pytest test_suite.py --html=report.html
|
871
871
|
```
|
872
872
|
|
@@ -876,7 +876,7 @@ pytest test_suite.py --html=report.html
|
|
876
876
|
|
877
877
|
✅ Here's an example of an upgraded html report:
|
878
878
|
|
879
|
-
```
|
879
|
+
```zsh
|
880
880
|
pytest test_suite.py --dashboard --html=report.html
|
881
881
|
```
|
882
882
|
|
@@ -886,7 +886,7 @@ If viewing pytest html reports in [Jenkins](https://www.jenkins.io/), you may ne
|
|
886
886
|
|
887
887
|
You can also use ``--junit-xml=report.xml`` to get an xml report instead. Jenkins can use this file to display better reporting for your tests.
|
888
888
|
|
889
|
-
```
|
889
|
+
```zsh
|
890
890
|
pytest test_suite.py --junit-xml=report.xml
|
891
891
|
```
|
892
892
|
|
@@ -894,7 +894,7 @@ pytest test_suite.py --junit-xml=report.xml
|
|
894
894
|
|
895
895
|
The ``--report`` option gives you a fancy report after your test suite completes.
|
896
896
|
|
897
|
-
```
|
897
|
+
```zsh
|
898
898
|
pynose test_suite.py --report
|
899
899
|
```
|
900
900
|
|
@@ -906,7 +906,7 @@ pynose test_suite.py --report
|
|
906
906
|
|
907
907
|
(The [behave_bdd/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples/behave_bdd) folder can be found in the [examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) folder.)
|
908
908
|
|
909
|
-
```
|
909
|
+
```zsh
|
910
910
|
behave behave_bdd/features/ -D dashboard -D headless
|
911
911
|
```
|
912
912
|
|
@@ -914,7 +914,7 @@ behave behave_bdd/features/ -D dashboard -D headless
|
|
914
914
|
|
915
915
|
You can also use ``--junit`` to get ``.xml`` reports for each <code translate="no">behave</code> feature. Jenkins can use these files to display better reporting for your tests.
|
916
916
|
|
917
|
-
```
|
917
|
+
```zsh
|
918
918
|
behave behave_bdd/features/ --junit -D rs -D headless
|
919
919
|
```
|
920
920
|
|
@@ -924,13 +924,13 @@ See: [https://allurereport.org/docs/pytest/](https://allurereport.org/docs/pytes
|
|
924
924
|
|
925
925
|
SeleniumBase no longer includes ``allure-pytest`` as part of installed dependencies. If you want to use it, install it first:
|
926
926
|
|
927
|
-
```
|
927
|
+
```zsh
|
928
928
|
pip install allure-pytest
|
929
929
|
```
|
930
930
|
|
931
931
|
Now your tests can create Allure results files, which can be processed by Allure Reports.
|
932
932
|
|
933
|
-
```
|
933
|
+
```zsh
|
934
934
|
pytest test_suite.py --alluredir=allure_results
|
935
935
|
```
|
936
936
|
|
@@ -940,19 +940,19 @@ pytest test_suite.py --alluredir=allure_results
|
|
940
940
|
|
941
941
|
If you wish to use a proxy server for your browser tests (Chromium or Firefox), you can add ``--proxy=IP_ADDRESS:PORT`` as an argument on the command line.
|
942
942
|
|
943
|
-
```
|
943
|
+
```zsh
|
944
944
|
pytest proxy_test.py --proxy=IP_ADDRESS:PORT
|
945
945
|
```
|
946
946
|
|
947
947
|
If the proxy server that you wish to use requires authentication, you can do the following (Chromium only):
|
948
948
|
|
949
|
-
```
|
949
|
+
```zsh
|
950
950
|
pytest proxy_test.py --proxy=USERNAME:PASSWORD@IP_ADDRESS:PORT
|
951
951
|
```
|
952
952
|
|
953
953
|
SeleniumBase also supports SOCKS4 and SOCKS5 proxies:
|
954
954
|
|
955
|
-
```
|
955
|
+
```zsh
|
956
956
|
pytest proxy_test.py --proxy="socks4://IP_ADDRESS:PORT"
|
957
957
|
|
958
958
|
pytest proxy_test.py --proxy="socks5://IP_ADDRESS:PORT"
|
@@ -960,7 +960,7 @@ pytest proxy_test.py --proxy="socks5://IP_ADDRESS:PORT"
|
|
960
960
|
|
961
961
|
To make things easier, you can add your frequently-used proxies to PROXY_LIST in [proxy_list.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/proxy_list.py), and then use ``--proxy=KEY_FROM_PROXY_LIST`` to use the IP_ADDRESS:PORT of that key.
|
962
962
|
|
963
|
-
```
|
963
|
+
```zsh
|
964
964
|
pytest proxy_test.py --proxy=proxy1
|
965
965
|
```
|
966
966
|
|
@@ -969,7 +969,7 @@ pytest proxy_test.py --proxy=proxy1
|
|
969
969
|
|
970
970
|
🔵 If you wish to change the User-Agent for your browser tests (Chromium and Firefox only), you can add ``--agent="USER AGENT STRING"`` as an argument on the command-line.
|
971
971
|
|
972
|
-
```
|
972
|
+
```zsh
|
973
973
|
pytest user_agent_test.py --agent="Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1.7412.EU"
|
974
974
|
```
|
975
975
|
|
@@ -1007,7 +1007,7 @@ pytest user_agent_test.py --agent="Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1
|
|
1007
1007
|
|
1008
1008
|
Here's an example of running tests with some additional features enabled:
|
1009
1009
|
|
1010
|
-
```
|
1010
|
+
```zsh
|
1011
1011
|
pytest [YOUR_TEST_FILE.py] --with-db-reporting --with-s3-logging
|
1012
1012
|
```
|
1013
1013
|
|
@@ -1354,7 +1354,7 @@ self.driver.find_elements("partial link text", "GitHub")
|
|
1354
1354
|
|
1355
1355
|
<p>You can use <code translate="no">pytest --reruns=NUM</code> to retry failing tests that many times. Add <code translate="no">--reruns-delay=SECONDS</code> to wait that many seconds between retries. Example:</p>
|
1356
1356
|
|
1357
|
-
```
|
1357
|
+
```zsh
|
1358
1358
|
pytest --reruns=1 --reruns-delay=1
|
1359
1359
|
```
|
1360
1360
|
|