seleniumbase 4.39.1__py3-none-any.whl → 4.39.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.
- seleniumbase/__version__.py +1 -1
- seleniumbase/core/browser_launcher.py +3 -0
- seleniumbase/core/sb_driver.py +2 -1
- seleniumbase/plugins/driver_manager.py +2 -1
- seleniumbase/plugins/sb_manager.py +3 -2
- seleniumbase/undetected/cdp_driver/browser.py +4 -0
- seleniumbase/undetected/cdp_driver/cdp_util.py +0 -2
- seleniumbase/undetected/cdp_driver/connection.py +1 -0
- {seleniumbase-4.39.1.dist-info → seleniumbase-4.39.2.dist-info}/METADATA +1 -1
- {seleniumbase-4.39.1.dist-info → seleniumbase-4.39.2.dist-info}/RECORD +14 -14
- {seleniumbase-4.39.1.dist-info → seleniumbase-4.39.2.dist-info}/WHEEL +0 -0
- {seleniumbase-4.39.1.dist-info → seleniumbase-4.39.2.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.39.1.dist-info → seleniumbase-4.39.2.dist-info}/licenses/LICENSE +0 -0
- {seleniumbase-4.39.1.dist-info → seleniumbase-4.39.2.dist-info}/top_level.txt +0 -0
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.39.
|
2
|
+
__version__ = "4.39.2"
|
@@ -2169,6 +2169,9 @@ def _set_chrome_options(
|
|
2169
2169
|
prefs["profile.default_content_setting_values.automatic_downloads"] = 1
|
2170
2170
|
if locale_code:
|
2171
2171
|
prefs["intl.accept_languages"] = locale_code
|
2172
|
+
sb_config._cdp_locale = locale_code
|
2173
|
+
else:
|
2174
|
+
sb_config._cdp_locale = None
|
2172
2175
|
if block_images:
|
2173
2176
|
prefs["profile.managed_default_content_settings.images"] = 2
|
2174
2177
|
if disable_cookies:
|
seleniumbase/core/sb_driver.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
"""Add new methods to extend the driver"""
|
2
2
|
from contextlib import suppress
|
3
|
+
from selenium.webdriver.remote.webdriver import WebDriver
|
3
4
|
from selenium.webdriver.remote.webelement import WebElement
|
4
5
|
from seleniumbase.config import settings
|
5
6
|
from seleniumbase.fixtures import js_utils
|
@@ -8,7 +9,7 @@ from seleniumbase.fixtures import page_utils
|
|
8
9
|
from seleniumbase.fixtures import shared_utils
|
9
10
|
|
10
11
|
|
11
|
-
class DriverMethods():
|
12
|
+
class DriverMethods(WebDriver):
|
12
13
|
def __init__(self, driver):
|
13
14
|
self.driver = driver
|
14
15
|
|
@@ -38,6 +38,7 @@ driver.get("https://google.com/ncr")
|
|
38
38
|
"""
|
39
39
|
import os
|
40
40
|
import sys
|
41
|
+
from seleniumbase.core import sb_driver
|
41
42
|
|
42
43
|
|
43
44
|
class DriverContext():
|
@@ -139,7 +140,7 @@ def Driver(
|
|
139
140
|
pls=None, # Shortcut / Duplicate of "page_load_strategy".
|
140
141
|
cft=None, # Use "Chrome for Testing"
|
141
142
|
chs=None, # Use "Chrome-Headless-Shell"
|
142
|
-
):
|
143
|
+
) -> sb_driver.DriverMethods:
|
143
144
|
"""
|
144
145
|
* SeleniumBase Driver as a Python Context Manager or a returnable object. *
|
145
146
|
|
@@ -24,6 +24,8 @@ with SB(uc=True) as sb: # Many args! Eg. SB(browser="edge")
|
|
24
24
|
#########################################
|
25
25
|
"""
|
26
26
|
from contextlib import contextmanager, suppress
|
27
|
+
from typing import Any, Generator
|
28
|
+
from seleniumbase import BaseCase
|
27
29
|
|
28
30
|
|
29
31
|
@contextmanager # Usage: -> ``with SB() as sb:``
|
@@ -133,7 +135,7 @@ def SB(
|
|
133
135
|
highlights=None, # Number of highlight animations for Demo Mode actions.
|
134
136
|
interval=None, # SECONDS (Autoplay interval for SB Slides & Tour steps.)
|
135
137
|
time_limit=None, # SECONDS (Safely fail tests that exceed the time limit.)
|
136
|
-
):
|
138
|
+
) -> Generator[BaseCase, Any, None]:
|
137
139
|
"""
|
138
140
|
* SeleniumBase as a Python Context Manager *
|
139
141
|
|
@@ -263,7 +265,6 @@ def SB(
|
|
263
265
|
import sys
|
264
266
|
import time
|
265
267
|
import traceback
|
266
|
-
from seleniumbase import BaseCase
|
267
268
|
from seleniumbase import config as sb_config
|
268
269
|
from seleniumbase.config import settings
|
269
270
|
from seleniumbase.fixtures import constants
|
@@ -323,6 +323,8 @@ class Browser:
|
|
323
323
|
_cdp_locale = kwargs["locale"]
|
324
324
|
elif "lang" in kwargs:
|
325
325
|
_cdp_locale = kwargs["lang"]
|
326
|
+
elif "locale_code" in kwargs:
|
327
|
+
_cdp_locale = kwargs["locale_code"]
|
326
328
|
if "platform" in kwargs:
|
327
329
|
_cdp_platform = kwargs["platform"]
|
328
330
|
elif "plat" in kwargs:
|
@@ -336,6 +338,8 @@ class Browser:
|
|
336
338
|
if _cdp_timezone:
|
337
339
|
await connection.send(cdp.page.navigate("about:blank"))
|
338
340
|
await connection.set_timezone(_cdp_timezone)
|
341
|
+
if _cdp_locale:
|
342
|
+
await connection.set_locale(_cdp_locale)
|
339
343
|
if _cdp_user_agent or _cdp_locale or _cdp_platform:
|
340
344
|
await connection.send(cdp.page.navigate("about:blank"))
|
341
345
|
await connection.set_user_agent(
|
@@ -370,8 +370,6 @@ async def start(
|
|
370
370
|
sb_config._cdp_locale = kwargs["locale"]
|
371
371
|
elif "locale_code" in kwargs:
|
372
372
|
sb_config._cdp_locale = kwargs["locale_code"]
|
373
|
-
else:
|
374
|
-
sb_config._cdp_locale = None
|
375
373
|
if tzone:
|
376
374
|
sb_config._cdp_timezone = tzone
|
377
375
|
elif "timezone" in kwargs:
|
@@ -347,6 +347,7 @@ class Connection(metaclass=CantTouchThis):
|
|
347
347
|
async def set_locale(self, locale: Optional[str] = None):
|
348
348
|
"""Sets the Language Locale code via set_user_agent_override."""
|
349
349
|
await self.set_user_agent(user_agent="", accept_language=locale)
|
350
|
+
await self.send(cdp.emulation.set_locale_override(locale))
|
350
351
|
|
351
352
|
async def set_timezone(self, timezone: Optional[str] = None):
|
352
353
|
"""Sets the Timezone via set_timezone_override."""
|
@@ -3,7 +3,7 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
|
|
3
3
|
sbase/steps.py,sha256=_WvAjydKqZfTdnZW9LPKkRty-g-lfdUPmLqnZj6ulcs,43013
|
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=lKg8cpa3sHnLx8LvY_0AE9MEapr-ETW6w2um2b_KvJA,46
|
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=bbbfa8ID6nMnmrVJ7G-014uOj5PE4B8IROZB2WXSQ8I,59172
|
@@ -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=EwMup2zhgUGslHsjoeMPbKSD5-W92M2hKO6RiNqL06Q,242895
|
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
|
@@ -51,7 +51,7 @@ seleniumbase/core/recorder_helper.py,sha256=fNGjbapXmEsht54x1o6Igk198QdnPxDDnjUO
|
|
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=zgkVXOhwf94NGdsUO0eM8yVUS3s5FzSuAPJNsz3lrZo,86452
|
54
|
-
seleniumbase/core/sb_driver.py,sha256=
|
54
|
+
seleniumbase/core/sb_driver.py,sha256=yUdS9_9OXTVaWzp1qY7msvnsvCK8X3FIcxMixb0BuBE,13827
|
55
55
|
seleniumbase/core/session_helper.py,sha256=s9zD3PVZEWVzG2h81cCUskbNWLfdjC_LwwQjKptHCak,558
|
56
56
|
seleniumbase/core/settings_parser.py,sha256=gqVohHVlE_5L5Cqe2L24uYrRzvoK-saX8E_Df7_-_3I,7609
|
57
57
|
seleniumbase/core/style_sheet.py,sha256=5qYN5GLk4gkwg7nqp3h0XH5YXRijANzKDuEdalzccuw,11714
|
@@ -86,11 +86,11 @@ seleniumbase/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
86
86
|
seleniumbase/plugins/base_plugin.py,sha256=ItLgtaZmu_363iycy8BNX0Do5LyIWGiTMLW6krXM-WQ,14748
|
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=VSYQgDDA2t34gi-3qPkw5Ef9SX8sVQX3RETHOihyKHc,36558
|
90
90
|
seleniumbase/plugins/page_source.py,sha256=loTnXxOj4kxEukuTZEiGyvKBhY3KDVDMnNlHHheTBDE,1889
|
91
91
|
seleniumbase/plugins/pytest_plugin.py,sha256=952AIyaH-PdmNksoeXjzhXxoc8Z53yV-WPjlrHhp2OM,108382
|
92
92
|
seleniumbase/plugins/s3_logging_plugin.py,sha256=WDfertQgGOW_SRJpFMaekYD6vBVW9VO62POtXXy2HCM,2319
|
93
|
-
seleniumbase/plugins/sb_manager.py,sha256=
|
93
|
+
seleniumbase/plugins/sb_manager.py,sha256=ulTDorccan06eVYtSqlX26EFKXmS0gCY0huJ67Q5gTY,58082
|
94
94
|
seleniumbase/plugins/screen_shots.py,sha256=1hrXw-hzuZ1BR6Yh7AyWX2ABnvnP73-RCbwdz958gj4,1127
|
95
95
|
seleniumbase/plugins/selenium_plugin.py,sha256=y0eNco8T4KgGLProLPHPLw479QH5lRms4wqwOnTgkSc,60081
|
96
96
|
seleniumbase/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -115,10 +115,10 @@ seleniumbase/undetected/reactor.py,sha256=NropaXcO54pzmDq6quR27qPJxab6636H7LRAaq
|
|
115
115
|
seleniumbase/undetected/webelement.py,sha256=OOpUYbEiOG52KsYYyuDW9tYLdA2SMnukvwQHUdPVn9E,1389
|
116
116
|
seleniumbase/undetected/cdp_driver/__init__.py,sha256=Ga9alwuaZZy4_XOShc0HjgFnNqpPdrcbjAicz5gE7a4,215
|
117
117
|
seleniumbase/undetected/cdp_driver/_contradict.py,sha256=lP4b0h5quAy573ETn_TBbYV889cL1AuPLVInpJ0ZkiU,3183
|
118
|
-
seleniumbase/undetected/cdp_driver/browser.py,sha256=
|
119
|
-
seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=
|
118
|
+
seleniumbase/undetected/cdp_driver/browser.py,sha256=5XVzfA6JQqh5q5ShKgSwjebB9n598leKZ4EYfG49bgs,34565
|
119
|
+
seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=_DoF4EE1osbzSb3do-sIrMnL_Gse2S2vs3NUAuhGSAI,24819
|
120
120
|
seleniumbase/undetected/cdp_driver/config.py,sha256=4-nUkEf7JSuOdFMNd6XmJnFucZrA59-kH1FUMxDcgFU,12561
|
121
|
-
seleniumbase/undetected/cdp_driver/connection.py,sha256=
|
121
|
+
seleniumbase/undetected/cdp_driver/connection.py,sha256=WgZ4QamXSdTzP4Xfgkn8mxv-JFivMG6hqbyHy2_LQlg,25717
|
122
122
|
seleniumbase/undetected/cdp_driver/element.py,sha256=FIC6v7OmumLCT-_vIc3H4oju_oBbaLpWJUJIKm2c_q4,40467
|
123
123
|
seleniumbase/undetected/cdp_driver/tab.py,sha256=t7Ucn0pmm7imwdCM-5KmIJNU2MCeMuIl6G3T2VMrbxU,53170
|
124
124
|
seleniumbase/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -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.39.
|
139
|
-
seleniumbase-4.39.
|
140
|
-
seleniumbase-4.39.
|
141
|
-
seleniumbase-4.39.
|
142
|
-
seleniumbase-4.39.
|
143
|
-
seleniumbase-4.39.
|
138
|
+
seleniumbase-4.39.2.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
|
139
|
+
seleniumbase-4.39.2.dist-info/METADATA,sha256=zpx8oqimtSYIkLI1km87q72UZwlGwX0xll23x7bCS5M,87206
|
140
|
+
seleniumbase-4.39.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
141
|
+
seleniumbase-4.39.2.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.39.2.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.39.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|