seleniumbase 4.32.4__py3-none-any.whl → 4.32.4a2__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.
- seleniumbase/__version__.py +1 -1
- seleniumbase/core/browser_launcher.py +0 -1
- seleniumbase/fixtures/base_case.py +2 -2
- seleniumbase/plugins/driver_manager.py +2 -2
- seleniumbase/undetected/__init__.py +5 -13
- seleniumbase/undetected/options.py +13 -6
- {seleniumbase-4.32.4.dist-info → seleniumbase-4.32.4a2.dist-info}/METADATA +4 -6
- {seleniumbase-4.32.4.dist-info → seleniumbase-4.32.4a2.dist-info}/RECORD +12 -12
- {seleniumbase-4.32.4.dist-info → seleniumbase-4.32.4a2.dist-info}/LICENSE +0 -0
- {seleniumbase-4.32.4.dist-info → seleniumbase-4.32.4a2.dist-info}/WHEEL +0 -0
- {seleniumbase-4.32.4.dist-info → seleniumbase-4.32.4a2.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.32.4.dist-info → seleniumbase-4.32.4a2.dist-info}/top_level.txt +0 -0
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.32.
|
2
|
+
__version__ = "4.32.4a2"
|
@@ -542,7 +542,6 @@ def uc_open_with_cdp_mode(driver, url=None):
|
|
542
542
|
driver.cdp_base = loop.run_until_complete(
|
543
543
|
cdp_util.start(host=cdp_host, port=cdp_port)
|
544
544
|
)
|
545
|
-
|
546
545
|
page = loop.run_until_complete(driver.cdp_base.get(url))
|
547
546
|
loop.run_until_complete(page.activate())
|
548
547
|
if not safe_url:
|
@@ -4167,13 +4167,13 @@ class BaseCase(unittest.TestCase):
|
|
4167
4167
|
device_pixel_ratio=d_p_r,
|
4168
4168
|
browser=browser_name,
|
4169
4169
|
)
|
4170
|
-
time.sleep(0.
|
4170
|
+
time.sleep(0.2)
|
4171
4171
|
except Exception:
|
4172
4172
|
pass
|
4173
4173
|
finally:
|
4174
4174
|
with suppress(Exception):
|
4175
|
+
decoy_driver.disconnect()
|
4175
4176
|
decoy_driver.quit()
|
4176
|
-
time.sleep(0.08)
|
4177
4177
|
# Launch a web browser
|
4178
4178
|
new_driver = browser_launcher.get_driver(
|
4179
4179
|
browser_name=browser_name,
|
@@ -870,13 +870,13 @@ def Driver(
|
|
870
870
|
device_pixel_ratio=d_p_r,
|
871
871
|
browser=browser_name,
|
872
872
|
)
|
873
|
-
time.sleep(0.
|
873
|
+
time.sleep(0.2)
|
874
874
|
except Exception:
|
875
875
|
pass
|
876
876
|
finally:
|
877
877
|
with suppress(Exception):
|
878
|
+
decoy_driver.disconnect()
|
878
879
|
decoy_driver.quit()
|
879
|
-
time.sleep(0.08)
|
880
880
|
|
881
881
|
driver = browser_launcher.get_driver(
|
882
882
|
browser_name=browser_name,
|
@@ -432,15 +432,10 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
432
432
|
time.sleep(timeout)
|
433
433
|
with suppress(Exception):
|
434
434
|
self.service.start()
|
435
|
+
time.sleep(0.012)
|
435
436
|
with suppress(Exception):
|
436
437
|
self.start_session()
|
437
|
-
|
438
|
-
if self.current_url.startswith("chrome-extension://"):
|
439
|
-
self.close()
|
440
|
-
self.service.stop()
|
441
|
-
self.service.start()
|
442
|
-
self.start_session()
|
443
|
-
self._is_connected = True
|
438
|
+
time.sleep(0.012)
|
444
439
|
|
445
440
|
def disconnect(self):
|
446
441
|
"""Stops the chromedriver service that runs in the background.
|
@@ -449,6 +444,7 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
449
444
|
with suppress(Exception):
|
450
445
|
self.service.stop()
|
451
446
|
self._is_connected = False
|
447
|
+
time.sleep(0.012)
|
452
448
|
|
453
449
|
def connect(self):
|
454
450
|
"""Starts the chromedriver service that runs in the background
|
@@ -456,15 +452,11 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
456
452
|
if hasattr(self, "service"):
|
457
453
|
with suppress(Exception):
|
458
454
|
self.service.start()
|
455
|
+
time.sleep(0.012)
|
459
456
|
with suppress(Exception):
|
460
457
|
self.start_session()
|
461
|
-
with suppress(Exception):
|
462
|
-
if self.current_url.startswith("chrome-extension://"):
|
463
|
-
self.close()
|
464
|
-
self.service.stop()
|
465
|
-
self.service.start()
|
466
|
-
self.start_session()
|
467
458
|
self._is_connected = True
|
459
|
+
time.sleep(0.012)
|
468
460
|
|
469
461
|
def start_session(self, capabilities=None):
|
470
462
|
if not capabilities:
|
@@ -1,8 +1,11 @@
|
|
1
1
|
import json
|
2
|
+
import logging
|
2
3
|
import os
|
3
4
|
from contextlib import suppress
|
4
5
|
from selenium.webdriver.chromium.options import ChromiumOptions
|
5
6
|
|
7
|
+
logger = logging.getLogger(__name__)
|
8
|
+
|
6
9
|
|
7
10
|
class ChromeOptions(ChromiumOptions):
|
8
11
|
_session = None
|
@@ -48,7 +51,7 @@ class ChromeOptions(ChromiumOptions):
|
|
48
51
|
undot_prefs = self._merge_nested(
|
49
52
|
undot_prefs, self._undot_key(key, value)
|
50
53
|
)
|
51
|
-
prefs_file = os.path.join(default_path, "Preferences")
|
54
|
+
prefs_file = os.path.join(default_path, "Preferences") + os.sep
|
52
55
|
with suppress(Exception):
|
53
56
|
if os.path.exists(prefs_file):
|
54
57
|
with open(
|
@@ -57,11 +60,15 @@ class ChromeOptions(ChromiumOptions):
|
|
57
60
|
undot_prefs = self._merge_nested(
|
58
61
|
json.load(f), undot_prefs
|
59
62
|
)
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
63
|
+
if (
|
64
|
+
not os.path.exists(prefs_file)
|
65
|
+
or not any(os.scandir(prefs_file))
|
66
|
+
):
|
67
|
+
with suppress(Exception):
|
68
|
+
with open(
|
69
|
+
prefs_file, encoding="utf-8", mode="w", errors="ignore"
|
70
|
+
) as f:
|
71
|
+
json.dump(undot_prefs, f)
|
65
72
|
# Remove experimental_options to avoid errors
|
66
73
|
del self._experimental_options["prefs"]
|
67
74
|
exclude_switches = self.experimental_options.get("excludeSwitches")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.32.
|
3
|
+
Version: 4.32.4a2
|
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
|
@@ -59,7 +59,7 @@ Classifier: Topic :: Utilities
|
|
59
59
|
Requires-Python: >=3.8
|
60
60
|
Description-Content-Type: text/markdown
|
61
61
|
License-File: LICENSE
|
62
|
-
Requires-Dist: pip>=24.
|
62
|
+
Requires-Dist: pip>=24.3.1
|
63
63
|
Requires-Dist: packaging>=24.1
|
64
64
|
Requires-Dist: wheel>=0.44.0
|
65
65
|
Requires-Dist: attrs>=24.2.0
|
@@ -79,8 +79,8 @@ Requires-Dist: parse-type>=0.6.4
|
|
79
79
|
Requires-Dist: colorama>=0.4.6
|
80
80
|
Requires-Dist: pyyaml>=6.0.2
|
81
81
|
Requires-Dist: pygments>=2.18.0
|
82
|
-
Requires-Dist: tabcompleter>=1.
|
83
|
-
Requires-Dist: pdbp>=1.
|
82
|
+
Requires-Dist: tabcompleter>=1.3.3
|
83
|
+
Requires-Dist: pdbp>=1.5.4
|
84
84
|
Requires-Dist: idna==3.10
|
85
85
|
Requires-Dist: chardet==5.2.0
|
86
86
|
Requires-Dist: charset-normalizer==3.4.0
|
@@ -236,8 +236,6 @@ Requires-Dist: zstandard==0.23.0; extra == "selenium-wire"
|
|
236
236
|
|
237
237
|
👤 Note that <span translate="no">SeleniumBase</span> <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md"><b>UC Mode</b> (Stealth Mode) has its own ReadMe</a>.
|
238
238
|
|
239
|
-
🐙 Also note that Seleniumbase <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md"><b>CDP Mode</b> has its own separate ReadMe</a>.
|
240
|
-
|
241
239
|
ℹ️ Scripts can be called via <code translate="no"><b>python</b></code>, although some <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> expect <a href="https://docs.pytest.org/en/latest/how-to/usage.html" translate="no"><b>pytest</b></a> (a Python unit-testing framework included with SeleniumBase that can discover, collect, and run tests automatically).
|
242
240
|
|
243
241
|
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>, which tests login, shopping, and checkout:</p>
|
@@ -3,7 +3,7 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
|
|
3
3
|
sbase/steps.py,sha256=bKT_u5bJkKzYWEuAXi9NVVRYYxQRCM1_YJUrNFFRVPY,42865
|
4
4
|
seleniumbase/__init__.py,sha256=OtJh8nGKL4xtZpw8KPqmn7Q6R-86t4cWUDyVF5MbMTo,2398
|
5
5
|
seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
|
6
|
-
seleniumbase/__version__.py,sha256=
|
6
|
+
seleniumbase/__version__.py,sha256=y8P2Dh2BOUPuFJlt8NHL_koUMOo4oC9FUxkGTDH3rw4,48
|
7
7
|
seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
seleniumbase/behave/behave_helper.py,sha256=elkl8P9eLulRAioLstE9baYNM9N_PHBmAOcajX-pH_Y,24198
|
9
9
|
seleniumbase/behave/behave_sb.py,sha256=-hza7Nx2U41mSObYiPMi48v3JlPh3sJO3yzP0kqZ1Gk,59174
|
@@ -36,7 +36,7 @@ seleniumbase/console_scripts/sb_print.py,sha256=tNy-bMDgwHJO3bZxMpmo9weSE8uhbH0C
|
|
36
36
|
seleniumbase/console_scripts/sb_recorder.py,sha256=1oAA4wFzVboNhIFDwJLD3jgy9RuoavywKQG7R67bNZE,10908
|
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=oFXINtwzEmEZsqcmDIKG_sHDO1RCdhuxo3O8VtbsMYs,214920
|
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
|
@@ -65,7 +65,7 @@ seleniumbase/extensions/disable_csp.zip,sha256=YMifIIgEBiLrEFrS1sfW4Exh4br1V4oK1
|
|
65
65
|
seleniumbase/extensions/recorder.zip,sha256=OOyzF-Ize2cSRu1CqhzSAq5vusI9hqLLd2OIApUHesI,11918
|
66
66
|
seleniumbase/extensions/sbase_ext.zip,sha256=3s1N8zrVaMz8RQEOIoBzC3KDjtmHwVZRvVsX25Odr_s,8175
|
67
67
|
seleniumbase/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
68
|
-
seleniumbase/fixtures/base_case.py,sha256=
|
68
|
+
seleniumbase/fixtures/base_case.py,sha256=1U8m_t2sOn9M5BknPyZIumWfohVxvEyO4-Mxzsp_vJE,714730
|
69
69
|
seleniumbase/fixtures/constants.py,sha256=XYYMpB-ZDI756LvfhSK9RxdqQ_qO9fJVXgBqBYlQNkk,13609
|
70
70
|
seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3O5hSnEKA,1954
|
71
71
|
seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
|
@@ -86,7 +86,7 @@ seleniumbase/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
86
86
|
seleniumbase/plugins/base_plugin.py,sha256=FemdftNhOaTfQIw5bWcJQPPPGQ3P0_sMEI_YYDuzZgU,14972
|
87
87
|
seleniumbase/plugins/basic_test_info.py,sha256=8ov6n417gPbqqvrlT4zrch7l2XcRt-GF2ny6rR9AMWk,2108
|
88
88
|
seleniumbase/plugins/db_reporting_plugin.py,sha256=En09qUCoojrk9-vbcnsoHdSELoGmag2GDIyu3jTiJas,7331
|
89
|
-
seleniumbase/plugins/driver_manager.py,sha256=
|
89
|
+
seleniumbase/plugins/driver_manager.py,sha256=EkrnG8zLRw8P0VXFImsvyfXdDDRPAnHA8QwZd6WRdI8,37806
|
90
90
|
seleniumbase/plugins/page_source.py,sha256=loTnXxOj4kxEukuTZEiGyvKBhY3KDVDMnNlHHheTBDE,1889
|
91
91
|
seleniumbase/plugins/pytest_plugin.py,sha256=Up96HY6q3hcPo4LQoEcKqt1hm2OmY5GZz_nMXTqDSXQ,97185
|
92
92
|
seleniumbase/plugins/s3_logging_plugin.py,sha256=WDfertQgGOW_SRJpFMaekYD6vBVW9VO62POtXXy2HCM,2319
|
@@ -106,10 +106,10 @@ seleniumbase/translate/portuguese.py,sha256=x3P4qxp56UiI41GoaL7JbUvFRYsgXU1EKjTg
|
|
106
106
|
seleniumbase/translate/russian.py,sha256=TyN9n0b4GRWDEYnHRGw1rfNAscdDmP3F3Y3aySM3C7s,27978
|
107
107
|
seleniumbase/translate/spanish.py,sha256=hh3xgW1Pq122SHYVvJAxFaXhFrjniOVncVbJbfWqOUM,25528
|
108
108
|
seleniumbase/translate/translator.py,sha256=wPhZH6e5NhmebYL1kP2eGxUcVy1gfTb6XCH8ATEPpxE,49238
|
109
|
-
seleniumbase/undetected/__init__.py,sha256=
|
109
|
+
seleniumbase/undetected/__init__.py,sha256=RzY5_ZQdVDzkybaYamvoIF5ChC1dTjqXPVFQB63iZVA,22111
|
110
110
|
seleniumbase/undetected/cdp.py,sha256=RLpwZnhUvmK9tgXcZIBBQedwk2q7Jj_EXZkmzI8WUqk,4023
|
111
111
|
seleniumbase/undetected/dprocess.py,sha256=83EV8ZHJWHG1TSUv9JNClBhdgiBXlkCc6mJ--HsoP3k,1681
|
112
|
-
seleniumbase/undetected/options.py,sha256=
|
112
|
+
seleniumbase/undetected/options.py,sha256=wt_Jpd7LKmj8rZGnBoap8pMmKqRuihlOUPhavbpUKa8,3220
|
113
113
|
seleniumbase/undetected/patcher.py,sha256=n9WfKznr4cQvaE5Gcx7iyK27zMWIc8KdI69_m817CSQ,10825
|
114
114
|
seleniumbase/undetected/reactor.py,sha256=NropaXcO54pzmDq6quR27qPJxab6636H7LRAaq-o0ng,2859
|
115
115
|
seleniumbase/undetected/webelement.py,sha256=_s6evgUkdWJpwOnzX4qR9i796PoVbz3txlzHlOBJ4BE,1370
|
@@ -135,9 +135,9 @@ seleniumbase/utilities/selenium_grid/start-grid-hub.bat,sha256=Ftq-GrAKRYH2ssDPr
|
|
135
135
|
seleniumbase/utilities/selenium_grid/start-grid-hub.sh,sha256=KADv0RUHONLL2_I443QFK8PryBpDmKn5Gy0s4o0vDSM,106
|
136
136
|
seleniumbase/utilities/selenium_ide/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
137
137
|
seleniumbase/utilities/selenium_ide/convert_ide.py,sha256=pZFnqEJQEKZPyNFjkLD29s2HPQgCrWW9XJWpCPhWOoM,31691
|
138
|
-
seleniumbase-4.32.
|
139
|
-
seleniumbase-4.32.
|
140
|
-
seleniumbase-4.32.
|
141
|
-
seleniumbase-4.32.
|
142
|
-
seleniumbase-4.32.
|
143
|
-
seleniumbase-4.32.
|
138
|
+
seleniumbase-4.32.4a2.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
|
139
|
+
seleniumbase-4.32.4a2.dist-info/METADATA,sha256=19nt4iAhnK_g73CFHxmZIbJHMZ1UZUf_OHqv9sWNkB0,86097
|
140
|
+
seleniumbase-4.32.4a2.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
141
|
+
seleniumbase-4.32.4a2.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.32.4a2.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.32.4a2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|