seleniumbase 4.32.4__py3-none-any.whl → 4.32.4a1__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 +7 -14
- seleniumbase/undetected/cdp.py +1 -0
- seleniumbase/undetected/dprocess.py +1 -0
- seleniumbase/undetected/options.py +34 -9
- seleniumbase/undetected/patcher.py +1 -0
- seleniumbase/undetected/reactor.py +1 -0
- {seleniumbase-4.32.4.dist-info → seleniumbase-4.32.4a1.dist-info}/METADATA +4 -6
- {seleniumbase-4.32.4.dist-info → seleniumbase-4.32.4a1.dist-info}/RECORD +16 -16
- {seleniumbase-4.32.4.dist-info → seleniumbase-4.32.4a1.dist-info}/LICENSE +0 -0
- {seleniumbase-4.32.4.dist-info → seleniumbase-4.32.4a1.dist-info}/WHEEL +0 -0
- {seleniumbase-4.32.4.dist-info → seleniumbase-4.32.4a1.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.32.4.dist-info → seleniumbase-4.32.4a1.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.4a1"
|
@@ -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
4175
|
decoy_driver.quit()
|
4176
|
-
time.sleep(0.
|
4176
|
+
time.sleep(0.1)
|
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
878
|
decoy_driver.quit()
|
879
|
-
time.sleep(0.
|
879
|
+
time.sleep(0.1)
|
880
880
|
|
881
881
|
driver = browser_launcher.get_driver(
|
882
882
|
browser_name=browser_name,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
#!/usr/bin/env python3
|
1
2
|
import logging
|
2
3
|
import os
|
3
4
|
import re
|
@@ -251,7 +252,7 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
251
252
|
"Default",
|
252
253
|
"Preferences",
|
253
254
|
),
|
254
|
-
encoding="
|
255
|
+
encoding="latin1",
|
255
256
|
mode="r+",
|
256
257
|
errors="ignore",
|
257
258
|
) as fs:
|
@@ -432,15 +433,10 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
432
433
|
time.sleep(timeout)
|
433
434
|
with suppress(Exception):
|
434
435
|
self.service.start()
|
436
|
+
time.sleep(0.012)
|
435
437
|
with suppress(Exception):
|
436
438
|
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
|
439
|
+
time.sleep(0.012)
|
444
440
|
|
445
441
|
def disconnect(self):
|
446
442
|
"""Stops the chromedriver service that runs in the background.
|
@@ -449,6 +445,7 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
449
445
|
with suppress(Exception):
|
450
446
|
self.service.stop()
|
451
447
|
self._is_connected = False
|
448
|
+
time.sleep(0.012)
|
452
449
|
|
453
450
|
def connect(self):
|
454
451
|
"""Starts the chromedriver service that runs in the background
|
@@ -456,15 +453,11 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
456
453
|
if hasattr(self, "service"):
|
457
454
|
with suppress(Exception):
|
458
455
|
self.service.start()
|
456
|
+
time.sleep(0.012)
|
459
457
|
with suppress(Exception):
|
460
458
|
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
459
|
self._is_connected = True
|
460
|
+
time.sleep(0.012)
|
468
461
|
|
469
462
|
def start_session(self, capabilities=None):
|
470
463
|
if not capabilities:
|
seleniumbase/undetected/cdp.py
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
+
#!/usr/bin/env python3
|
1
2
|
import json
|
3
|
+
import logging
|
2
4
|
import os
|
5
|
+
import time
|
3
6
|
from contextlib import suppress
|
4
7
|
from selenium.webdriver.chromium.options import ChromiumOptions
|
5
8
|
|
9
|
+
logger = logging.getLogger(__name__)
|
10
|
+
|
6
11
|
|
7
12
|
class ChromeOptions(ChromiumOptions):
|
8
13
|
_session = None
|
@@ -52,16 +57,36 @@ class ChromeOptions(ChromiumOptions):
|
|
52
57
|
with suppress(Exception):
|
53
58
|
if os.path.exists(prefs_file):
|
54
59
|
with open(
|
55
|
-
prefs_file,
|
60
|
+
prefs_file,
|
61
|
+
encoding="latin1",
|
62
|
+
mode="r",
|
63
|
+
errors="ignore",
|
56
64
|
) as f:
|
57
|
-
|
58
|
-
|
59
|
-
)
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
+
data = json.load(f)
|
66
|
+
logger.debug("Existing preferences: %s" % data)
|
67
|
+
undot_prefs = self._merge_nested(data, undot_prefs)
|
68
|
+
logger.debug("Combined preferences: %s" % undot_prefs)
|
69
|
+
time.sleep(0.005)
|
70
|
+
if not os.path.exists(prefs_file):
|
71
|
+
try:
|
72
|
+
with open(
|
73
|
+
prefs_file,
|
74
|
+
encoding="latin1",
|
75
|
+
mode="w",
|
76
|
+
errors="ignore",
|
77
|
+
) as f:
|
78
|
+
json.dump(undot_prefs, f)
|
79
|
+
except Exception:
|
80
|
+
time.sleep(0.005)
|
81
|
+
with suppress(Exception):
|
82
|
+
with open(
|
83
|
+
prefs_file,
|
84
|
+
encoding="utf-8",
|
85
|
+
mode="w",
|
86
|
+
errors="ignore",
|
87
|
+
) as f:
|
88
|
+
json.dump(undot_prefs, f)
|
89
|
+
time.sleep(0.005)
|
65
90
|
# Remove experimental_options to avoid errors
|
66
91
|
del self._experimental_options["prefs"]
|
67
92
|
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.4a1
|
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
|
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=p3-TsNmVZnxoL7V9NMUn0fjSrX_dTOvJak7Ef8Bil9o,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=vOiDIDR7HzqTjCw0QdTLFoTyf96mFghtjFwYyEaJz_s,714720
|
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=_gnlVch6BYRrneSW5eAsEqpZ95uzC48c_wMkLN4FuCs,37796
|
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,12 +106,12 @@ 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=
|
110
|
-
seleniumbase/undetected/cdp.py,sha256=
|
111
|
-
seleniumbase/undetected/dprocess.py,sha256=
|
112
|
-
seleniumbase/undetected/options.py,sha256=
|
113
|
-
seleniumbase/undetected/patcher.py,sha256=
|
114
|
-
seleniumbase/undetected/reactor.py,sha256=
|
109
|
+
seleniumbase/undetected/__init__.py,sha256=3UukttRSdScUGCrms2BK35os3uSt130Z1BtxQJmhqxE,22136
|
110
|
+
seleniumbase/undetected/cdp.py,sha256=EralLQm8diG5i6EoHFXHIQEc7Uf7PWtzyPH_upS5RIs,4047
|
111
|
+
seleniumbase/undetected/dprocess.py,sha256=VLwyLWXSg-6GkeKpAQcTXLRmuBb0oEdku3_qgMifuwY,1705
|
112
|
+
seleniumbase/undetected/options.py,sha256=3a-W5AkRR4PPU9PuaHlG7IZXIp5XbECxvk-73wHfOhY,3913
|
113
|
+
seleniumbase/undetected/patcher.py,sha256=GqNqUwqDDFZg-Y3O6JOyFoOGhHN0r5PV46Mc9b9_BP0,10849
|
114
|
+
seleniumbase/undetected/reactor.py,sha256=UT1pEnGaTPZT7-0-xKROk9_eWDZueGzSUrCksc22nyA,2883
|
115
115
|
seleniumbase/undetected/webelement.py,sha256=_s6evgUkdWJpwOnzX4qR9i796PoVbz3txlzHlOBJ4BE,1370
|
116
116
|
seleniumbase/undetected/cdp_driver/__init__.py,sha256=c0TjMwPfVFyoqYOJ7PQ-Jln_L_dpN3ebHyaD-juQoM0,64
|
117
117
|
seleniumbase/undetected/cdp_driver/_contradict.py,sha256=6thDYeoEGiC7Q3tXLgoD_AhxecCFnATzBSjNympyRHA,3184
|
@@ -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.4a1.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
|
139
|
+
seleniumbase-4.32.4a1.dist-info/METADATA,sha256=0y0snuA19qHT4QS36utt8jBsCN15L0DShe4Rc6Zo-Ds,86095
|
140
|
+
seleniumbase-4.32.4a1.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
141
|
+
seleniumbase-4.32.4a1.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.32.4a1.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.32.4a1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|