seleniumbase 4.19.2__py3-none-any.whl → 4.20.0__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 +85 -12
- seleniumbase/fixtures/base_case.py +12 -17
- seleniumbase/fixtures/constants.py +13 -0
- seleniumbase/fixtures/js_utils.py +1 -1
- seleniumbase/plugins/driver_manager.py +0 -3
- seleniumbase/plugins/pytest_plugin.py +1 -5
- seleniumbase/plugins/sb_manager.py +9 -4
- seleniumbase/plugins/selenium_plugin.py +2 -11
- seleniumbase/undetected/__init__.py +6 -11
- {seleniumbase-4.19.2.dist-info → seleniumbase-4.20.0.dist-info}/METADATA +2 -2
- {seleniumbase-4.19.2.dist-info → seleniumbase-4.20.0.dist-info}/RECORD +16 -16
- {seleniumbase-4.19.2.dist-info → seleniumbase-4.20.0.dist-info}/LICENSE +0 -0
- {seleniumbase-4.19.2.dist-info → seleniumbase-4.20.0.dist-info}/WHEEL +0 -0
- {seleniumbase-4.19.2.dist-info → seleniumbase-4.20.0.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.19.2.dist-info → seleniumbase-4.20.0.dist-info}/top_level.txt +0 -0
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.
|
2
|
+
__version__ = "4.20.0"
|
@@ -319,7 +319,15 @@ def has_cf(text):
|
|
319
319
|
return False
|
320
320
|
|
321
321
|
|
322
|
-
def uc_special_open_if_cf(
|
322
|
+
def uc_special_open_if_cf(
|
323
|
+
driver,
|
324
|
+
url,
|
325
|
+
proxy_string=None,
|
326
|
+
mobile_emulator=None,
|
327
|
+
device_width=None,
|
328
|
+
device_height=None,
|
329
|
+
device_pixel_ratio=None,
|
330
|
+
):
|
323
331
|
if (
|
324
332
|
url.startswith("http:") or url.startswith("https:")
|
325
333
|
):
|
@@ -345,6 +353,36 @@ def uc_special_open_if_cf(driver, url, proxy_string=None):
|
|
345
353
|
driver.close()
|
346
354
|
driver.switch_to.window(driver.window_handles[-1])
|
347
355
|
time.sleep(0.02)
|
356
|
+
if mobile_emulator:
|
357
|
+
uc_metrics = {}
|
358
|
+
if (
|
359
|
+
type(device_width) is int
|
360
|
+
and type(device_height) is int
|
361
|
+
and type(device_pixel_ratio) is int
|
362
|
+
):
|
363
|
+
uc_metrics["width"] = device_width
|
364
|
+
uc_metrics["height"] = device_height
|
365
|
+
uc_metrics["pixelRatio"] = device_pixel_ratio
|
366
|
+
else:
|
367
|
+
uc_metrics["width"] = constants.Mobile.WIDTH
|
368
|
+
uc_metrics["height"] = constants.Mobile.HEIGHT
|
369
|
+
uc_metrics["pixelRatio"] = constants.Mobile.RATIO
|
370
|
+
set_device_metrics_override = dict(
|
371
|
+
{
|
372
|
+
"width": uc_metrics["width"],
|
373
|
+
"height": uc_metrics["height"],
|
374
|
+
"deviceScaleFactor": uc_metrics["pixelRatio"],
|
375
|
+
"mobile": True
|
376
|
+
}
|
377
|
+
)
|
378
|
+
try:
|
379
|
+
driver.execute_cdp_cmd(
|
380
|
+
'Emulation.setDeviceMetricsOverride',
|
381
|
+
set_device_metrics_override
|
382
|
+
)
|
383
|
+
except Exception:
|
384
|
+
pass
|
385
|
+
time.sleep(0.03)
|
348
386
|
else:
|
349
387
|
driver.default_get(url) # The original one
|
350
388
|
else:
|
@@ -739,7 +777,7 @@ def _set_chrome_options(
|
|
739
777
|
"excludeSwitches",
|
740
778
|
["enable-automation", "enable-logging", "enable-blink-features"],
|
741
779
|
)
|
742
|
-
if mobile_emulator:
|
780
|
+
if mobile_emulator and not is_using_uc(undetectable, browser_name):
|
743
781
|
emulator_settings = {}
|
744
782
|
device_metrics = {}
|
745
783
|
if (
|
@@ -751,9 +789,9 @@ def _set_chrome_options(
|
|
751
789
|
device_metrics["height"] = device_height
|
752
790
|
device_metrics["pixelRatio"] = device_pixel_ratio
|
753
791
|
else:
|
754
|
-
device_metrics["width"] =
|
755
|
-
device_metrics["height"] =
|
756
|
-
device_metrics["pixelRatio"] =
|
792
|
+
device_metrics["width"] = constants.Mobile.WIDTH
|
793
|
+
device_metrics["height"] = constants.Mobile.HEIGHT
|
794
|
+
device_metrics["pixelRatio"] = constants.Mobile.RATIO
|
757
795
|
emulator_settings["deviceMetrics"] = device_metrics
|
758
796
|
if user_agent:
|
759
797
|
emulator_settings["userAgent"] = user_agent
|
@@ -1279,8 +1317,8 @@ def get_driver(
|
|
1279
1317
|
if (uc_cdp_events or uc_subprocess) and not undetectable:
|
1280
1318
|
undetectable = True
|
1281
1319
|
if is_using_uc(undetectable, browser_name) and mobile_emulator:
|
1282
|
-
|
1283
|
-
|
1320
|
+
if not user_agent:
|
1321
|
+
user_agent = constants.Mobile.AGENT
|
1284
1322
|
if page_load_strategy and page_load_strategy.lower() == "none":
|
1285
1323
|
settings.PAGE_LOAD_STRATEGY = "none"
|
1286
1324
|
proxy_auth = False
|
@@ -2359,7 +2397,7 @@ def get_local_driver(
|
|
2359
2397
|
elif headless:
|
2360
2398
|
if "--headless" not in edge_options.arguments:
|
2361
2399
|
edge_options.add_argument("--headless")
|
2362
|
-
if mobile_emulator:
|
2400
|
+
if mobile_emulator and not is_using_uc(undetectable, browser_name):
|
2363
2401
|
emulator_settings = {}
|
2364
2402
|
device_metrics = {}
|
2365
2403
|
if (
|
@@ -2371,9 +2409,9 @@ def get_local_driver(
|
|
2371
2409
|
device_metrics["height"] = device_height
|
2372
2410
|
device_metrics["pixelRatio"] = device_pixel_ratio
|
2373
2411
|
else:
|
2374
|
-
device_metrics["width"] =
|
2375
|
-
device_metrics["height"] =
|
2376
|
-
device_metrics["pixelRatio"] =
|
2412
|
+
device_metrics["width"] = constants.Mobile.WIDTH
|
2413
|
+
device_metrics["height"] = constants.Mobile.HEIGHT
|
2414
|
+
device_metrics["pixelRatio"] = constants.Mobile.RATIO
|
2377
2415
|
emulator_settings["deviceMetrics"] = device_metrics
|
2378
2416
|
if user_agent:
|
2379
2417
|
emulator_settings["userAgent"] = user_agent
|
@@ -3416,7 +3454,13 @@ def get_local_driver(
|
|
3416
3454
|
driver.default_get = driver.get # Save copy of original
|
3417
3455
|
if uc_activated:
|
3418
3456
|
driver.get = lambda url: uc_special_open_if_cf(
|
3419
|
-
driver,
|
3457
|
+
driver,
|
3458
|
+
url,
|
3459
|
+
proxy_string,
|
3460
|
+
mobile_emulator,
|
3461
|
+
device_width,
|
3462
|
+
device_height,
|
3463
|
+
device_pixel_ratio,
|
3420
3464
|
)
|
3421
3465
|
driver.uc_open = lambda url: uc_open(driver, url)
|
3422
3466
|
driver.uc_open_with_tab = (
|
@@ -3425,6 +3469,35 @@ def get_local_driver(
|
|
3425
3469
|
driver.uc_open_with_reconnect = (
|
3426
3470
|
lambda url: uc_open_with_reconnect(driver, url)
|
3427
3471
|
)
|
3472
|
+
if mobile_emulator:
|
3473
|
+
uc_metrics = {}
|
3474
|
+
if (
|
3475
|
+
type(device_width) is int
|
3476
|
+
and type(device_height) is int
|
3477
|
+
and type(device_pixel_ratio) is int
|
3478
|
+
):
|
3479
|
+
uc_metrics["width"] = device_width
|
3480
|
+
uc_metrics["height"] = device_height
|
3481
|
+
uc_metrics["pixelRatio"] = device_pixel_ratio
|
3482
|
+
else:
|
3483
|
+
uc_metrics["width"] = constants.Mobile.WIDTH
|
3484
|
+
uc_metrics["height"] = constants.Mobile.HEIGHT
|
3485
|
+
uc_metrics["pixelRatio"] = constants.Mobile.RATIO
|
3486
|
+
set_device_metrics_override = dict(
|
3487
|
+
{
|
3488
|
+
"width": uc_metrics["width"],
|
3489
|
+
"height": uc_metrics["height"],
|
3490
|
+
"deviceScaleFactor": uc_metrics["pixelRatio"],
|
3491
|
+
"mobile": True
|
3492
|
+
}
|
3493
|
+
)
|
3494
|
+
try:
|
3495
|
+
driver.execute_cdp_cmd(
|
3496
|
+
'Emulation.setDeviceMetricsOverride',
|
3497
|
+
set_device_metrics_override
|
3498
|
+
)
|
3499
|
+
except Exception:
|
3500
|
+
pass
|
3428
3501
|
return extend_driver(driver)
|
3429
3502
|
else: # Running headless on Linux (and not using --uc)
|
3430
3503
|
try:
|
@@ -3887,12 +3887,8 @@ class BaseCase(unittest.TestCase):
|
|
3887
3887
|
if d_p_r is None:
|
3888
3888
|
d_p_r = self.__device_pixel_ratio
|
3889
3889
|
if is_mobile and not user_agent:
|
3890
|
-
# Use
|
3891
|
-
user_agent =
|
3892
|
-
"Mozilla/5.0 (Linux; Android 11; Pixel 4 XL) "
|
3893
|
-
"AppleWebKit/537.36 (KHTML, like Gecko) "
|
3894
|
-
"Chrome/89.0.4389.105 Mobile Safari/537.36"
|
3895
|
-
)
|
3890
|
+
# Use a Pixel user agent by default if not specified
|
3891
|
+
user_agent = constants.Mobile.AGENT
|
3896
3892
|
valid_browsers = constants.ValidBrowsers.valid_browsers
|
3897
3893
|
if browser_name not in valid_browsers:
|
3898
3894
|
raise Exception(
|
@@ -14351,15 +14347,9 @@ class BaseCase(unittest.TestCase):
|
|
14351
14347
|
self.mobile_emulator = True
|
14352
14348
|
except Exception:
|
14353
14349
|
raise Exception(exception_string)
|
14354
|
-
if self.mobile_emulator:
|
14355
|
-
if not
|
14356
|
-
|
14357
|
-
self.user_agent = (
|
14358
|
-
"Mozilla/5.0 (Linux; Android 11; Pixel 4 XL) "
|
14359
|
-
"AppleWebKit/537.36 (KHTML, like Gecko) "
|
14360
|
-
"Chrome/89.0.4389.105 Mobile Safari/537.36"
|
14361
|
-
)
|
14362
|
-
|
14350
|
+
if self.mobile_emulator and not self.user_agent:
|
14351
|
+
# Use a Pixel user agent by default if not specified
|
14352
|
+
self.user_agent = constants.Mobile.AGENT
|
14363
14353
|
if self.browser in ["firefox", "ie", "safari"]:
|
14364
14354
|
# The Recorder Mode browser extension is only for Chrome/Edge.
|
14365
14355
|
if self.recorder_mode:
|
@@ -15314,11 +15304,11 @@ class BaseCase(unittest.TestCase):
|
|
15314
15304
|
# Post Mortem Debug Mode ("python --pdb")
|
15315
15305
|
|
15316
15306
|
def __activate_debug_mode_in_teardown(self):
|
15317
|
-
"""Activate
|
15307
|
+
"""Activate Final Trace / Debug Mode"""
|
15318
15308
|
import pdb
|
15319
15309
|
|
15320
15310
|
pdb.set_trace()
|
15321
|
-
# Final
|
15311
|
+
# Final Trace ("--ftrace")
|
15322
15312
|
|
15323
15313
|
def has_exception(self):
|
15324
15314
|
"""(This method should ONLY be used in custom tearDown() methods.)
|
@@ -15813,6 +15803,11 @@ class BaseCase(unittest.TestCase):
|
|
15813
15803
|
and sb_config._do_sb_post_mortem
|
15814
15804
|
):
|
15815
15805
|
self.__activate_sb_mgr_post_mortem_debug_mode()
|
15806
|
+
elif (
|
15807
|
+
hasattr(sb_config, "_do_sb_final_trace")
|
15808
|
+
and sb_config._do_sb_final_trace
|
15809
|
+
):
|
15810
|
+
self.__activate_debug_mode_in_teardown()
|
15816
15811
|
# (Pynose / Behave / Pure Python) Close all open browser windows
|
15817
15812
|
self.__quit_all_drivers()
|
15818
15813
|
# Resume tearDown() for all test runners, (Pytest / Pynose / Behave)
|
@@ -346,6 +346,19 @@ class SeleniumWire:
|
|
346
346
|
VER = "5.1.0"
|
347
347
|
|
348
348
|
|
349
|
+
class Mobile:
|
350
|
+
# Default values for mobile settings
|
351
|
+
WIDTH = 390
|
352
|
+
HEIGHT = 715
|
353
|
+
RATIO = 3
|
354
|
+
AGENT = (
|
355
|
+
"Mozilla/5.0 (Linux; Android 13; Pixel 7 XL "
|
356
|
+
"Build/SP2A.220505.006.A1; wv) "
|
357
|
+
"AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 "
|
358
|
+
"Chrome/110.0.5028.105 Mobile Safari/537.36"
|
359
|
+
)
|
360
|
+
|
361
|
+
|
349
362
|
class ValidBrowsers:
|
350
363
|
valid_browsers = [
|
351
364
|
"chrome",
|
@@ -910,7 +910,7 @@ def post_messenger_success_message(driver, message, msg_dur=None):
|
|
910
910
|
theme = "future"
|
911
911
|
location = "bottom_right"
|
912
912
|
if hasattr(sb_config, "mobile_emulator") and sb_config.mobile_emulator:
|
913
|
-
location = "
|
913
|
+
location = "top_right"
|
914
914
|
set_messenger_theme(driver, theme=theme, location=location)
|
915
915
|
post_message(driver, message, msg_dur, style="success")
|
916
916
|
time.sleep(msg_dur + 0.07)
|
@@ -554,7 +554,7 @@ def pytest_addoption(parser):
|
|
554
554
|
help="""Designates the three device metrics of the mobile
|
555
555
|
emulator: CSS Width, CSS Height, and Pixel-Ratio.
|
556
556
|
Format: A comma-separated string with the 3 values.
|
557
|
-
|
557
|
+
Examples: "375,734,5" or "411,731,3" or "390,715,3"
|
558
558
|
Default: None. (Will use default values if None)""",
|
559
559
|
)
|
560
560
|
parser.addoption(
|
@@ -1399,10 +1399,6 @@ def pytest_addoption(parser):
|
|
1399
1399
|
"\n If you need both, override get_new_driver() from BaseCase:"
|
1400
1400
|
"\n https://seleniumbase.io/help_docs/syntax_formats/#sb_sf_09\n"
|
1401
1401
|
)
|
1402
|
-
if undetectable and "--mobile" in sys_argv:
|
1403
|
-
raise Exception(
|
1404
|
-
"\n SeleniumBase doesn't support mixing --uc with --mobile\n"
|
1405
|
-
)
|
1406
1402
|
|
1407
1403
|
|
1408
1404
|
def pytest_configure(config):
|
@@ -308,6 +308,8 @@ def SB(
|
|
308
308
|
is_mobile = True
|
309
309
|
else:
|
310
310
|
is_mobile = False
|
311
|
+
if is_mobile:
|
312
|
+
sb_config.mobile_emulator = True
|
311
313
|
proxy_string = proxy
|
312
314
|
user_agent = agent
|
313
315
|
recorder_mode = False
|
@@ -370,7 +372,6 @@ def SB(
|
|
370
372
|
sb_config.proxy_driver = True
|
371
373
|
if variables and type(variables) is str and len(variables) > 0:
|
372
374
|
import ast
|
373
|
-
|
374
375
|
bad_input = False
|
375
376
|
if (
|
376
377
|
not variables.startswith("{")
|
@@ -458,9 +459,6 @@ def SB(
|
|
458
459
|
uc_cdp_events = True
|
459
460
|
else:
|
460
461
|
uc_cdp_events = False
|
461
|
-
if undetectable and is_mobile:
|
462
|
-
is_mobile = False
|
463
|
-
user_agent = None
|
464
462
|
if use_auto_ext is None:
|
465
463
|
if "--use-auto-ext" in sys_argv:
|
466
464
|
use_auto_ext = True
|
@@ -875,6 +873,13 @@ def SB(
|
|
875
873
|
finally:
|
876
874
|
if sb._has_failure and "--pdb" in sys_argv:
|
877
875
|
sb_config._do_sb_post_mortem = True
|
876
|
+
elif (
|
877
|
+
"--final-debug" in sys_argv
|
878
|
+
or "--final-trace" in sys_argv
|
879
|
+
or "--fdebug" in sys_argv
|
880
|
+
or "--ftrace" in sys_argv
|
881
|
+
):
|
882
|
+
sb_config._do_sb_final_trace = True
|
878
883
|
try:
|
879
884
|
sb.tearDown()
|
880
885
|
except Exception as t_e:
|
@@ -296,7 +296,7 @@ class SeleniumBrowser(Plugin):
|
|
296
296
|
help="""Designates the three device metrics of the mobile
|
297
297
|
emulator: CSS Width, CSS Height, and Pixel-Ratio.
|
298
298
|
Format: A comma-separated string with the 3 values.
|
299
|
-
|
299
|
+
Examples: "375,734,5" or "411,731,3" or "390,715,3"
|
300
300
|
Default: None. (Will use default values if None)""",
|
301
301
|
)
|
302
302
|
parser.addoption(
|
@@ -1163,16 +1163,6 @@ class SeleniumBrowser(Plugin):
|
|
1163
1163
|
)
|
1164
1164
|
self.options.use_wire = False
|
1165
1165
|
test.test.use_wire = False
|
1166
|
-
if self.options.mobile_emulator and self.options.undetectable:
|
1167
|
-
print(
|
1168
|
-
"\n"
|
1169
|
-
"SeleniumBase doesn't support mixing --uc with --mobile.\n"
|
1170
|
-
"(Only UC Mode without Mobile will be used for this run)\n"
|
1171
|
-
)
|
1172
|
-
self.options.mobile_emulator = False
|
1173
|
-
test.test.mobile_emulator = False
|
1174
|
-
self.options.user_agent = None
|
1175
|
-
test.test.user_agent = None
|
1176
1166
|
# Recorder Mode can still optimize scripts in --headless2 mode.
|
1177
1167
|
if self.options.recorder_mode and self.options.headless:
|
1178
1168
|
self.options.headless = False
|
@@ -1205,6 +1195,7 @@ class SeleniumBrowser(Plugin):
|
|
1205
1195
|
sb_config._SMALL_TIMEOUT = settings.SMALL_TIMEOUT
|
1206
1196
|
sb_config._LARGE_TIMEOUT = settings.LARGE_TIMEOUT
|
1207
1197
|
sb_config._context_of_runner = False # Context Manager Compatibility
|
1198
|
+
sb_config.mobile_emulator = self.options.mobile_emulator
|
1208
1199
|
sb_config.proxy_driver = self.options.proxy_driver
|
1209
1200
|
sb_config.multi_proxy = self.options.multi_proxy
|
1210
1201
|
# The driver will be received later
|
@@ -2,6 +2,7 @@
|
|
2
2
|
import logging
|
3
3
|
import os
|
4
4
|
import re
|
5
|
+
import requests
|
5
6
|
import subprocess
|
6
7
|
import sys
|
7
8
|
import time
|
@@ -138,8 +139,6 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
138
139
|
options._session = self
|
139
140
|
debug_host = "127.0.0.1"
|
140
141
|
debug_port = 9222
|
141
|
-
import requests
|
142
|
-
|
143
142
|
special_port_free = False # If the port isn't free, don't use 9222
|
144
143
|
try:
|
145
144
|
res = requests.get("http://127.0.0.1:9222", timeout=1)
|
@@ -151,7 +150,6 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
151
150
|
sys_argv = sys.argv
|
152
151
|
arg_join = " ".join(sys_argv)
|
153
152
|
from seleniumbase import config as sb_config
|
154
|
-
|
155
153
|
if (
|
156
154
|
(("-n" in sys.argv) or (" -n=" in arg_join) or ("-c" in sys.argv))
|
157
155
|
or (hasattr(sb_config, "multi_proxy") and sb_config.multi_proxy)
|
@@ -197,7 +195,6 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
197
195
|
keep_user_data_dir = True
|
198
196
|
else:
|
199
197
|
import tempfile
|
200
|
-
|
201
198
|
user_data_dir = os.path.normpath(tempfile.mkdtemp())
|
202
199
|
keep_user_data_dir = False
|
203
200
|
arg = "--user-data-dir=%s" % user_data_dir
|
@@ -206,7 +203,6 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
206
203
|
if not language:
|
207
204
|
try:
|
208
205
|
import locale
|
209
|
-
|
210
206
|
language = locale.getlocale()[0].replace("_", "-")
|
211
207
|
except Exception:
|
212
208
|
pass
|
@@ -241,7 +237,6 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
241
237
|
options.handle_prefs(user_data_dir)
|
242
238
|
try:
|
243
239
|
import json
|
244
|
-
|
245
240
|
with open(
|
246
241
|
os.path.join(
|
247
242
|
os.path.abspath(user_data_dir),
|
@@ -286,19 +281,22 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
286
281
|
)
|
287
282
|
self.browser_pid = browser.pid
|
288
283
|
service_ = None
|
284
|
+
log_output = subprocess.PIPE
|
285
|
+
if sys.version_info < (3, 8):
|
286
|
+
log_output = os.devnull
|
289
287
|
if patch_driver:
|
290
288
|
service_ = selenium.webdriver.chrome.service.Service(
|
291
289
|
executable_path=self.patcher.executable_path,
|
292
290
|
service_args=["--disable-build-check"],
|
293
291
|
port=port,
|
294
|
-
log_output=
|
292
|
+
log_output=log_output,
|
295
293
|
)
|
296
294
|
else:
|
297
295
|
service_ = selenium.webdriver.chrome.service.Service(
|
298
296
|
executable_path=driver_executable_path,
|
299
297
|
service_args=["--disable-build-check"],
|
300
298
|
port=port,
|
301
|
-
log_output=
|
299
|
+
log_output=log_output,
|
302
300
|
)
|
303
301
|
if hasattr(service_, "creationflags"):
|
304
302
|
setattr(service_, "creationflags", creationflags)
|
@@ -321,7 +319,6 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
321
319
|
return super().__getattribute__(item)
|
322
320
|
else:
|
323
321
|
import inspect
|
324
|
-
|
325
322
|
original = super().__getattribute__(item)
|
326
323
|
if inspect.ismethod(original) and not inspect.isclass(original):
|
327
324
|
def newfunc(*args, **kwargs):
|
@@ -455,7 +452,6 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
455
452
|
and not self.keep_user_data_dir
|
456
453
|
):
|
457
454
|
import shutil
|
458
|
-
|
459
455
|
for _ in range(5):
|
460
456
|
try:
|
461
457
|
shutil.rmtree(self.user_data_dir, ignore_errors=False)
|
@@ -506,7 +502,6 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|
506
502
|
|
507
503
|
def find_chrome_executable():
|
508
504
|
from seleniumbase.core import detect_b_ver
|
509
|
-
|
510
505
|
binary_location = detect_b_ver.get_binary_location("google-chrome", True)
|
511
506
|
if os.path.exists(binary_location) and os.access(binary_location, os.X_OK):
|
512
507
|
return os.path.normpath(binary_location)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.
|
3
|
+
Version: 4.20.0
|
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
|
@@ -110,7 +110,7 @@ Requires-Dist: markdown-it-py ==2.2.0 ; python_version < "3.8"
|
|
110
110
|
Requires-Dist: urllib3 <2.1.0,>=1.26.16 ; python_version >= "3.10"
|
111
111
|
Requires-Dist: setuptools >=68.2.2 ; python_version >= "3.8"
|
112
112
|
Requires-Dist: filelock >=3.12.4 ; python_version >= "3.8"
|
113
|
-
Requires-Dist: selenium ==4.
|
113
|
+
Requires-Dist: selenium ==4.14.0 ; python_version >= "3.8"
|
114
114
|
Requires-Dist: pluggy ==1.3.0 ; python_version >= "3.8"
|
115
115
|
Requires-Dist: soupsieve ==2.5 ; python_version >= "3.8"
|
116
116
|
Requires-Dist: markdown-it-py ==3.0.0 ; python_version >= "3.8"
|
@@ -5,7 +5,7 @@ sbase/steps.py,sha256=bKT_u5bJkKzYWEuAXi9NVVRYYxQRCM1_YJUrNFFRVPY,42865
|
|
5
5
|
seleniumbase/ReadMe.md,sha256=5Bnv8gsyKQGABhLj0S4HXZdtVic98puQlIGYc7YHUm8,3612
|
6
6
|
seleniumbase/__init__.py,sha256=Mw4ShIWUF2Efjx-JuwUQLWF9nIbxcX-vu9AOGBp32ec,2123
|
7
7
|
seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
|
8
|
-
seleniumbase/__version__.py,sha256=
|
8
|
+
seleniumbase/__version__.py,sha256=WppoVlR-4IaHFEhiVJGsiQcmilAJ6z1sYNJw38JxIOQ,46
|
9
9
|
seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
seleniumbase/behave/behave_helper.py,sha256=elkl8P9eLulRAioLstE9baYNM9N_PHBmAOcajX-pH_Y,24198
|
11
11
|
seleniumbase/behave/behave_sb.py,sha256=wbtJnCsnuZpYONeSYsf3U9u9wq2PYXo1xlGkYapPXQ4,55169
|
@@ -40,7 +40,7 @@ seleniumbase/console_scripts/sb_print.py,sha256=bFXBFusrKZ0v2OwCVgTiHvDCi17HdJYA
|
|
40
40
|
seleniumbase/console_scripts/sb_recorder.py,sha256=qcvQa89t-4eadfaKKWbQPpYGcTPMsSBTS_aJjyKUXYY,10816
|
41
41
|
seleniumbase/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
42
42
|
seleniumbase/core/application_manager.py,sha256=e_0sjtI8cjY5BNyZj1QBR0j6_oCScxGmSXYEpcYwuZE,576
|
43
|
-
seleniumbase/core/browser_launcher.py,sha256=
|
43
|
+
seleniumbase/core/browser_launcher.py,sha256=v_Iv45yOqnlhLMecdRexzPLsCfy0mZDgnWksY_jeVqA,151268
|
44
44
|
seleniumbase/core/capabilities_parser.py,sha256=lu2W7O1JrU9tLgvhx5gQ_Baqnkf3IjcPDzze0P2Ou-Y,5736
|
45
45
|
seleniumbase/core/colored_traceback.py,sha256=DrRWfg7XEnKcgY59Xj7Jdk09H-XqHYBSUpB-DiZt6iY,2020
|
46
46
|
seleniumbase/core/create_db_tables.sql,sha256=VWPtrdiW_HQ6yETHjqTu-VIrTwvd8I8o1NfBeaVSHpU,972
|
@@ -70,11 +70,11 @@ seleniumbase/extensions/disable_csp.zip,sha256=YMifIIgEBiLrEFrS1sfW4Exh4br1V4oK1
|
|
70
70
|
seleniumbase/extensions/recorder.zip,sha256=6xSyJUENrOFeSlcJFiYiYMFb3yHC_mQuTWj1iXTfjEw,11886
|
71
71
|
seleniumbase/extensions/sbase_ext.zip,sha256=3s1N8zrVaMz8RQEOIoBzC3KDjtmHwVZRvVsX25Odr_s,8175
|
72
72
|
seleniumbase/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
73
|
-
seleniumbase/fixtures/base_case.py,sha256=
|
74
|
-
seleniumbase/fixtures/constants.py,sha256=
|
73
|
+
seleniumbase/fixtures/base_case.py,sha256=3KB1S2szISJv3P1O1FSLxQn9X05ZfgWmXlSiauKIw2M,680791
|
74
|
+
seleniumbase/fixtures/constants.py,sha256=389hS_i4UpRvuo4mo2dW_aDFf5GUm-TfNzcYfSylemY,12845
|
75
75
|
seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3O5hSnEKA,1954
|
76
76
|
seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
|
77
|
-
seleniumbase/fixtures/js_utils.py,sha256=
|
77
|
+
seleniumbase/fixtures/js_utils.py,sha256=03CGD4ghpFuzAp2E4FceEXO10yMVRtCNs60tEAXE0bk,49906
|
78
78
|
seleniumbase/fixtures/page_actions.py,sha256=_5e_Wn3YXd-Ic_zL6FIZhaS0YA7tbXZ1UXJikON6rSA,61697
|
79
79
|
seleniumbase/fixtures/page_utils.py,sha256=jtkR47JkSJFEGCCojjSrwKeRKd_h6R4IvWxJOeM1GMo,12335
|
80
80
|
seleniumbase/fixtures/shared_utils.py,sha256=zWly5TqDr-zQ6oPjqLopi3SF0dKEh68VHNldc_o0kF8,5653
|
@@ -92,13 +92,13 @@ seleniumbase/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
92
92
|
seleniumbase/plugins/base_plugin.py,sha256=FTAqLh9e2c3UXcpXOcBPuK7-LjXpWlOizmdJWWF6XDo,14915
|
93
93
|
seleniumbase/plugins/basic_test_info.py,sha256=8ov6n417gPbqqvrlT4zrch7l2XcRt-GF2ny6rR9AMWk,2108
|
94
94
|
seleniumbase/plugins/db_reporting_plugin.py,sha256=cLIwG2CQFOA7lr4-uxmqPeL9WjUGbiBhgWkeUaNk_zI,7284
|
95
|
-
seleniumbase/plugins/driver_manager.py,sha256=
|
95
|
+
seleniumbase/plugins/driver_manager.py,sha256=mlO4QWmGWUF3wcE_n-1f80qAbHq_AXvlBXW1rHZA8j0,17737
|
96
96
|
seleniumbase/plugins/page_source.py,sha256=loTnXxOj4kxEukuTZEiGyvKBhY3KDVDMnNlHHheTBDE,1889
|
97
|
-
seleniumbase/plugins/pytest_plugin.py,sha256=
|
97
|
+
seleniumbase/plugins/pytest_plugin.py,sha256=LkSoy8_fxU1oiPMN_Aobd4dCirq9nTlEsFtHJZpyc14,91934
|
98
98
|
seleniumbase/plugins/s3_logging_plugin.py,sha256=WDfertQgGOW_SRJpFMaekYD6vBVW9VO62POtXXy2HCM,2319
|
99
|
-
seleniumbase/plugins/sb_manager.py,sha256=
|
99
|
+
seleniumbase/plugins/sb_manager.py,sha256=qWAN3BMTGOIUjYXzkPf8ePBen1eLxKka7-6jj3UaeFY,36537
|
100
100
|
seleniumbase/plugins/screen_shots.py,sha256=1hrXw-hzuZ1BR6Yh7AyWX2ABnvnP73-RCbwdz958gj4,1127
|
101
|
-
seleniumbase/plugins/selenium_plugin.py,sha256=
|
101
|
+
seleniumbase/plugins/selenium_plugin.py,sha256=UlJY8PAYmNWAvcb9ai0JhsZbz5yXaa9JTwOKsFBHz6c,52229
|
102
102
|
seleniumbase/resources/ReadMe.md,sha256=uminnO5_Uv-UZDKcc9a9s9kxisaYUps-H98Fp5PJcaU,2124
|
103
103
|
seleniumbase/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
104
104
|
seleniumbase/resources/favicon.ico,sha256=QPf_YK0QXa_--C4_CH-odh6OTHRQ9k-4O6WcCpXSdwM,1150
|
@@ -114,7 +114,7 @@ seleniumbase/translate/portuguese.py,sha256=x3P4qxp56UiI41GoaL7JbUvFRYsgXU1EKjTg
|
|
114
114
|
seleniumbase/translate/russian.py,sha256=TyN9n0b4GRWDEYnHRGw1rfNAscdDmP3F3Y3aySM3C7s,27978
|
115
115
|
seleniumbase/translate/spanish.py,sha256=hh3xgW1Pq122SHYVvJAxFaXhFrjniOVncVbJbfWqOUM,25528
|
116
116
|
seleniumbase/translate/translator.py,sha256=yHQILpiMom-D-9TgW3RrPW-EYxWRD-slecfpLUkJZk0,49436
|
117
|
-
seleniumbase/undetected/__init__.py,sha256=
|
117
|
+
seleniumbase/undetected/__init__.py,sha256=0nBaKps1w42tgISMhwhK5Nmt2eOpvJ8_5RvyCDYxdvs,20200
|
118
118
|
seleniumbase/undetected/cdp.py,sha256=EralLQm8diG5i6EoHFXHIQEc7Uf7PWtzyPH_upS5RIs,4047
|
119
119
|
seleniumbase/undetected/dprocess.py,sha256=WWQ_X_-Q7Lfx1m6oxkYHU0eTIc76Jodph4n1QnK4GEE,1706
|
120
120
|
seleniumbase/undetected/options.py,sha256=SGuz8iqlVPYN7IexNiGauupWF0xP3mqO72-9tgIqeuI,2999
|
@@ -137,9 +137,9 @@ seleniumbase/utilities/selenium_grid/start-grid-hub.sh,sha256=KADv0RUHONLL2_I443
|
|
137
137
|
seleniumbase/utilities/selenium_ide/ReadMe.md,sha256=hznGeuMpkIimqMiZBW-4goIy2ltW4l8X9kb0YSPUQfE,4483
|
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.
|
141
|
-
seleniumbase-4.
|
142
|
-
seleniumbase-4.
|
143
|
-
seleniumbase-4.
|
144
|
-
seleniumbase-4.
|
145
|
-
seleniumbase-4.
|
140
|
+
seleniumbase-4.20.0.dist-info/LICENSE,sha256=9CweYVs2pqSWEApWewHooJ5p5F44GV0wSXi-jV0kA_U,1085
|
141
|
+
seleniumbase-4.20.0.dist-info/METADATA,sha256=IQUU3ZDJFOvvrLw3Hjcv3FHYMwp2pu-HtsLY50yecwc,83339
|
142
|
+
seleniumbase-4.20.0.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
143
|
+
seleniumbase-4.20.0.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
144
|
+
seleniumbase-4.20.0.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
145
|
+
seleniumbase-4.20.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|