seleniumbase 4.40.0__py3-none-any.whl → 4.40.2__py3-none-any.whl
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.
- sbase/steps.py +9 -0
- seleniumbase/__version__.py +1 -1
- seleniumbase/behave/behave_helper.py +2 -0
- seleniumbase/core/browser_launcher.py +1 -1
- seleniumbase/core/recorder_helper.py +3 -0
- seleniumbase/fixtures/base_case.py +36 -0
- {seleniumbase-4.40.0.dist-info → seleniumbase-4.40.2.dist-info}/METADATA +42 -42
- {seleniumbase-4.40.0.dist-info → seleniumbase-4.40.2.dist-info}/RECORD +12 -12
- {seleniumbase-4.40.0.dist-info → seleniumbase-4.40.2.dist-info}/WHEEL +0 -0
- {seleniumbase-4.40.0.dist-info → seleniumbase-4.40.2.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.40.0.dist-info → seleniumbase-4.40.2.dist-info}/licenses/LICENSE +0 -0
- {seleniumbase-4.40.0.dist-info → seleniumbase-4.40.2.dist-info}/top_level.txt +0 -0
sbase/steps.py
CHANGED
@@ -1191,6 +1191,15 @@ def set_attributes(context, selector, attribute, value):
|
|
1191
1191
|
sb.set_attributes(selector, attribute, value)
|
1192
1192
|
|
1193
1193
|
|
1194
|
+
@step("Save page source to logs")
|
1195
|
+
@step("Save the page source to the logs")
|
1196
|
+
@step("User saves page source to logs")
|
1197
|
+
@step("User saves the page source to the logs")
|
1198
|
+
def save_page_source_to_logs(context):
|
1199
|
+
sb = context.sb
|
1200
|
+
sb.save_page_source_to_logs()
|
1201
|
+
|
1202
|
+
|
1194
1203
|
@step("Activate CDP Mode")
|
1195
1204
|
@step("User activates CDP Mode")
|
1196
1205
|
def activate_cdp_mode(context):
|
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.40.
|
2
|
+
__version__ = "4.40.2"
|
@@ -522,6 +522,8 @@ def generate_gherkin(srt_actions):
|
|
522
522
|
)
|
523
523
|
elif action[0] == "ss_tl":
|
524
524
|
sb_actions.append("Save screenshot to logs")
|
525
|
+
elif action[0] == "spstl":
|
526
|
+
sb_actions.append("Save page source to logs")
|
525
527
|
elif action[0] == "sh_fc":
|
526
528
|
sb_actions.append("Show file choosers")
|
527
529
|
elif action[0] == "pr_da":
|
@@ -131,7 +131,7 @@ def override_driver_dir(driver_dir):
|
|
131
131
|
bad_dir = os.path.realpath(driver_dir)
|
132
132
|
log_d(
|
133
133
|
"\n* Warning: Cannot set driver_dir to nonexistent directory:\n%s"
|
134
|
-
"\n* Will use the default folder instead:\n%s
|
134
|
+
"\n* Will use the default folder instead:\n%s"
|
135
135
|
% (bad_dir, DRIVER_DIR)
|
136
136
|
)
|
137
137
|
|
@@ -556,6 +556,9 @@ def generate_sbase_code(srt_actions):
|
|
556
556
|
elif action[0] == "ss_tl":
|
557
557
|
method = "save_screenshot_to_logs"
|
558
558
|
sb_actions.append("self.%s()" % method)
|
559
|
+
elif action[0] == "spstl":
|
560
|
+
method = "save_page_source_to_logs"
|
561
|
+
sb_actions.append("self.%s()" % method)
|
559
562
|
elif action[0] == "sh_fc":
|
560
563
|
method = "show_file_choosers"
|
561
564
|
sb_actions.append("self.%s()" % method)
|
@@ -132,6 +132,7 @@ class BaseCase(unittest.TestCase):
|
|
132
132
|
self.__called_teardown = False
|
133
133
|
self.__start_time_ms = int(time.time() * 1000.0)
|
134
134
|
self.__requests_timeout = None
|
135
|
+
self.__page_source_count = 0
|
135
136
|
self.__screenshot_count = 0
|
136
137
|
self.__logs_data_count = 0
|
137
138
|
self.__last_data_file = None
|
@@ -4512,6 +4513,40 @@ class BaseCase(unittest.TestCase):
|
|
4512
4513
|
sb_config._has_logs = True
|
4513
4514
|
return page_actions.save_screenshot(self.driver, name, test_logpath)
|
4514
4515
|
|
4516
|
+
def save_page_source_to_logs(self, name=None):
|
4517
|
+
"""Saves the page HTML to the "latest_logs/" folder.
|
4518
|
+
Naming is automatic:
|
4519
|
+
If NO NAME provided: "_1_source.html", "_2_source.html", etc.
|
4520
|
+
If NAME IS provided, then: "_1_name.html", "_2_name.html", etc.
|
4521
|
+
(The last_page / failure page_source is always "page_source.html")"""
|
4522
|
+
if not self.__is_cdp_swap_needed():
|
4523
|
+
self.wait_for_ready_state_complete()
|
4524
|
+
test_logpath = os.path.join(self.log_path, self.__get_test_id())
|
4525
|
+
self.__create_log_path_as_needed(test_logpath)
|
4526
|
+
if name:
|
4527
|
+
name = str(name)
|
4528
|
+
self.__page_source_count += 1
|
4529
|
+
if not name or len(name) == 0:
|
4530
|
+
name = "_%s_source.html" % self.__page_source_count
|
4531
|
+
else:
|
4532
|
+
pre_name = "_%s_" % self.__page_source_count
|
4533
|
+
if len(name) >= 4 and name[-4:].lower() == ".html":
|
4534
|
+
name = name[:-4]
|
4535
|
+
if len(name) == 0:
|
4536
|
+
name = "source"
|
4537
|
+
name = "%s%s.html" % (pre_name, name)
|
4538
|
+
if self.recorder_mode:
|
4539
|
+
url = self.get_current_url()
|
4540
|
+
if url and len(url) > 0:
|
4541
|
+
if ("http:") in url or ("https:") in url or ("file:") in url:
|
4542
|
+
if self.get_session_storage_item("pause_recorder") == "no":
|
4543
|
+
time_stamp = self.execute_script("return Date.now();")
|
4544
|
+
origin = self.get_origin()
|
4545
|
+
action = ["spstl", "", origin, time_stamp]
|
4546
|
+
self.__extra_actions.append(action)
|
4547
|
+
sb_config._has_logs = True
|
4548
|
+
return page_actions.save_page_source(self.driver, name, test_logpath)
|
4549
|
+
|
4515
4550
|
def save_data_to_logs(self, data, file_name=None):
|
4516
4551
|
"""Saves data to the "latest_logs/" data folder of the current test.
|
4517
4552
|
If no file_name, file_name becomes: "data_1.txt", "data_2.txt", etc.
|
@@ -5470,6 +5505,7 @@ class BaseCase(unittest.TestCase):
|
|
5470
5505
|
ext_actions.append("s_scr")
|
5471
5506
|
ext_actions.append("ss_tf")
|
5472
5507
|
ext_actions.append("ss_tl")
|
5508
|
+
ext_actions.append("spstl")
|
5473
5509
|
ext_actions.append("da_el")
|
5474
5510
|
ext_actions.append("da_ep")
|
5475
5511
|
ext_actions.append("da_te")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.40.
|
3
|
+
Version: 4.40.2
|
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.2; 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
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
sbase/__init__.py,sha256=02izDj786GVBT0bpSq2Q2O8uwSxtyT09pnobZz91ML8,605
|
2
2
|
sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
|
3
|
-
sbase/steps.py,sha256=
|
3
|
+
sbase/steps.py,sha256=EdJyNVJ1yxoHsc7qp8kzx0EESIkOh_033yLCvmaPcs4,43281
|
4
4
|
seleniumbase/__init__.py,sha256=JFEY9P5QJqsa1M6ghzLMH2eIPQyh85iglCaQwg8Y8z4,2498
|
5
5
|
seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
|
6
|
-
seleniumbase/__version__.py,sha256=
|
6
|
+
seleniumbase/__version__.py,sha256=c2RgolHwAg4xXI7aapOCEu0FuBUHzqqKm-ydLs6RvoA,46
|
7
7
|
seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
seleniumbase/behave/behave_helper.py,sha256=
|
8
|
+
seleniumbase/behave/behave_helper.py,sha256=f4CdiSSYM3gMAicSKWJInkVGFwpGXtHMD8fikTehopQ,24291
|
9
9
|
seleniumbase/behave/behave_sb.py,sha256=guLihFsr1uJ4v2AR3r3Vy_BTeHrHwy2JEJxhp-MVnZA,59872
|
10
10
|
seleniumbase/behave/steps.py,sha256=8-N-NB2tnDsxaP4LSg-uSBgbwZYMS6ZEL1oggO1PCoU,390
|
11
11
|
seleniumbase/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -36,7 +36,7 @@ seleniumbase/console_scripts/sb_print.py,sha256=tNy-bMDgwHJO3bZxMpmo9weSE8uhbH0C
|
|
36
36
|
seleniumbase/console_scripts/sb_recorder.py,sha256=DH-n2fN7N9qyHMl7wjtn8MiliBgfw-1kwgmfg1GUuhk,10772
|
37
37
|
seleniumbase/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
38
|
seleniumbase/core/application_manager.py,sha256=e_0sjtI8cjY5BNyZj1QBR0j6_oCScxGmSXYEpcYwuZE,576
|
39
|
-
seleniumbase/core/browser_launcher.py,sha256=
|
39
|
+
seleniumbase/core/browser_launcher.py,sha256=0NUGq4IdmS3L0vW7PW3RZZpiPr4468g5umtTGSZgLho,247484
|
40
40
|
seleniumbase/core/capabilities_parser.py,sha256=meIS2uHapTCq2ldfNAToC7r0cKmZDRXuYNKExM1GHDY,6038
|
41
41
|
seleniumbase/core/colored_traceback.py,sha256=DrRWfg7XEnKcgY59Xj7Jdk09H-XqHYBSUpB-DiZt6iY,2020
|
42
42
|
seleniumbase/core/create_db_tables.sql,sha256=VWPtrdiW_HQ6yETHjqTu-VIrTwvd8I8o1NfBeaVSHpU,972
|
@@ -47,7 +47,7 @@ seleniumbase/core/jqc_helper.py,sha256=2DDQr9Q2jSSZqFzX588jLlUM9oJvyrRWq2aORSIPU
|
|
47
47
|
seleniumbase/core/log_helper.py,sha256=JvB3FyOJJkVAP5RZXUuap468LIacqlO1UsqtEAVTfG4,23612
|
48
48
|
seleniumbase/core/mysql.py,sha256=X1McqBWCzN9DndyBbNrVg9_kvtaByVhodiXYkGbn36A,3955
|
49
49
|
seleniumbase/core/proxy_helper.py,sha256=pZ1NboNfziHU3vWZLOZLX-qkfM3oKSnpc3omQf9EUQQ,8809
|
50
|
-
seleniumbase/core/recorder_helper.py,sha256=
|
50
|
+
seleniumbase/core/recorder_helper.py,sha256=OBqNiCC_11ctpsD72KV4YUaKovmSpvs14HP1gwFesBA,25190
|
51
51
|
seleniumbase/core/report_helper.py,sha256=AIl6Qava2yW1uSzbLpJBlPlYDz0KE-rVhogh8hsGWBo,12201
|
52
52
|
seleniumbase/core/s3_manager.py,sha256=z_4qx2jI_gtK5r3niGXgEOBpfMUicUCOciowai50MP4,3529
|
53
53
|
seleniumbase/core/sb_cdp.py,sha256=2KYfNQQBjUa_o2oMaGlzmHpGuvz-SJ9baGfxVyjOCSM,94104
|
@@ -67,7 +67,7 @@ seleniumbase/extensions/disable_csp.zip,sha256=5RvomXnm2PdivUVcxTV6jfvD8WhTEsQYH
|
|
67
67
|
seleniumbase/extensions/recorder.zip,sha256=JEE_FVEvlS63cFQbVLEroIyPSS91nWCDL0MhjVrmIpk,11813
|
68
68
|
seleniumbase/extensions/sbase_ext.zip,sha256=3s1N8zrVaMz8RQEOIoBzC3KDjtmHwVZRvVsX25Odr_s,8175
|
69
69
|
seleniumbase/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
70
|
-
seleniumbase/fixtures/base_case.py,sha256=
|
70
|
+
seleniumbase/fixtures/base_case.py,sha256=cYPGF9mO2Asqxc3k03JprgIVCxGnL17NM3jex4ueG9c,736843
|
71
71
|
seleniumbase/fixtures/constants.py,sha256=WMrItuNyKq3XVJ64NluLIRc4gJCxDw8K8qXED0b9S2w,13752
|
72
72
|
seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3O5hSnEKA,1954
|
73
73
|
seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
|
@@ -137,9 +137,9 @@ seleniumbase/utilities/selenium_grid/start-grid-hub.bat,sha256=Ftq-GrAKRYH2ssDPr
|
|
137
137
|
seleniumbase/utilities/selenium_grid/start-grid-hub.sh,sha256=KADv0RUHONLL2_I443QFK8PryBpDmKn5Gy0s4o0vDSM,106
|
138
138
|
seleniumbase/utilities/selenium_ide/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
139
139
|
seleniumbase/utilities/selenium_ide/convert_ide.py,sha256=pZFnqEJQEKZPyNFjkLD29s2HPQgCrWW9XJWpCPhWOoM,31691
|
140
|
-
seleniumbase-4.40.
|
141
|
-
seleniumbase-4.40.
|
142
|
-
seleniumbase-4.40.
|
143
|
-
seleniumbase-4.40.
|
144
|
-
seleniumbase-4.40.
|
145
|
-
seleniumbase-4.40.
|
140
|
+
seleniumbase-4.40.2.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
|
141
|
+
seleniumbase-4.40.2.dist-info/METADATA,sha256=2nVYjycON5dy9g2PHbG3Cr9ZGCaUg9wOIO4EmQJdPh4,87295
|
142
|
+
seleniumbase-4.40.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
143
|
+
seleniumbase-4.40.2.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
144
|
+
seleniumbase-4.40.2.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
145
|
+
seleniumbase-4.40.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|