seleniumbase 4.43.3__py3-none-any.whl → 4.44.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 +20 -0
- seleniumbase/core/detect_b_ver.py +3 -0
- seleniumbase/core/sb_cdp.py +49 -26
- seleniumbase/fixtures/base_case.py +53 -7
- seleniumbase/fixtures/constants.py +6 -9
- seleniumbase/fixtures/page_actions.py +1 -1
- seleniumbase/plugins/driver_manager.py +4 -2
- seleniumbase/plugins/pytest_plugin.py +50 -2
- seleniumbase/plugins/sb_manager.py +4 -2
- seleniumbase/plugins/selenium_plugin.py +4 -2
- {seleniumbase-4.43.3.dist-info → seleniumbase-4.44.0.dist-info}/METADATA +3 -3
- {seleniumbase-4.43.3.dist-info → seleniumbase-4.44.0.dist-info}/RECORD +17 -17
- {seleniumbase-4.43.3.dist-info → seleniumbase-4.44.0.dist-info}/WHEEL +0 -0
- {seleniumbase-4.43.3.dist-info → seleniumbase-4.44.0.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.43.3.dist-info → seleniumbase-4.44.0.dist-info}/licenses/LICENSE +0 -0
- {seleniumbase-4.43.3.dist-info → seleniumbase-4.44.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.44.0"
|
|
@@ -551,6 +551,19 @@ def uc_open_with_tab(driver, url):
|
|
|
551
551
|
|
|
552
552
|
def uc_open_with_reconnect(driver, url, reconnect_time=None):
|
|
553
553
|
"""Open a url, disconnect chromedriver, wait, and reconnect."""
|
|
554
|
+
if (
|
|
555
|
+
hasattr(sb_config, "_cdp_browser")
|
|
556
|
+
and sb_config._cdp_browser in ["comet", "opera", "atlas"]
|
|
557
|
+
):
|
|
558
|
+
if not __is_cdp_swap_needed(driver):
|
|
559
|
+
if not driver.current_url.startswith(
|
|
560
|
+
("about", "data", "chrome")
|
|
561
|
+
):
|
|
562
|
+
driver.get("about:blank")
|
|
563
|
+
uc_activate_cdp_mode(driver, url)
|
|
564
|
+
else:
|
|
565
|
+
driver.cdp.open(url)
|
|
566
|
+
return
|
|
554
567
|
url = shared_utils.fix_url_as_needed(url)
|
|
555
568
|
if __is_cdp_swap_needed(driver):
|
|
556
569
|
driver.cdp.get(url)
|
|
@@ -885,6 +898,7 @@ def uc_open_with_cdp_mode(driver, url=None, **kwargs):
|
|
|
885
898
|
cdp.assert_not_in = CDPM.assert_not_in
|
|
886
899
|
cdp.scroll_into_view = CDPM.scroll_into_view
|
|
887
900
|
cdp.scroll_to_y = CDPM.scroll_to_y
|
|
901
|
+
cdp.scroll_by_y = CDPM.scroll_by_y
|
|
888
902
|
cdp.scroll_to_top = CDPM.scroll_to_top
|
|
889
903
|
cdp.scroll_to_bottom = CDPM.scroll_to_bottom
|
|
890
904
|
cdp.scroll_up = CDPM.scroll_up
|
|
@@ -2979,12 +2993,16 @@ def get_driver(
|
|
|
2979
2993
|
driver_dir = DRIVER_DIR_CHS
|
|
2980
2994
|
if _special_binary_exists(binary_location, "opera"):
|
|
2981
2995
|
driver_dir = DRIVER_DIR_OPERA
|
|
2996
|
+
sb_config._cdp_browser = "opera"
|
|
2982
2997
|
if _special_binary_exists(binary_location, "brave"):
|
|
2983
2998
|
driver_dir = DRIVER_DIR_BRAVE
|
|
2999
|
+
sb_config._cdp_browser = "brave"
|
|
2984
3000
|
if _special_binary_exists(binary_location, "comet"):
|
|
2985
3001
|
driver_dir = DRIVER_DIR_COMET
|
|
3002
|
+
sb_config._cdp_browser = "comet"
|
|
2986
3003
|
if _special_binary_exists(binary_location, "atlas"):
|
|
2987
3004
|
driver_dir = DRIVER_DIR_ATLAS
|
|
3005
|
+
sb_config._cdp_browser = "atlas"
|
|
2988
3006
|
if (
|
|
2989
3007
|
hasattr(sb_config, "settings")
|
|
2990
3008
|
and hasattr(sb_config.settings, "NEW_DRIVER_DIR")
|
|
@@ -2997,6 +3015,8 @@ def get_driver(
|
|
|
2997
3015
|
browser_name = browser
|
|
2998
3016
|
else:
|
|
2999
3017
|
browser_name = "chrome" # The default if not specified
|
|
3018
|
+
if browser_name in constants.ChromiumSubs.chromium_subs:
|
|
3019
|
+
browser_name = "chrome"
|
|
3000
3020
|
browser_name = browser_name.lower()
|
|
3001
3021
|
if headless2 and browser_name == constants.Browser.FIREFOX:
|
|
3002
3022
|
headless2 = False # Only for Chromium
|
|
@@ -278,6 +278,7 @@ def opera_on_windows_path(browser_type=None):
|
|
|
278
278
|
),
|
|
279
279
|
):
|
|
280
280
|
for subitem in (
|
|
281
|
+
"Programs/Opera",
|
|
281
282
|
"Opera",
|
|
282
283
|
"Opera/Application",
|
|
283
284
|
):
|
|
@@ -336,6 +337,7 @@ def comet_on_windows_path(browser_type=None):
|
|
|
336
337
|
):
|
|
337
338
|
for subitem in (
|
|
338
339
|
"Comet/Application",
|
|
340
|
+
"Programs/Comet",
|
|
339
341
|
):
|
|
340
342
|
try:
|
|
341
343
|
candidates.append(os.sep.join((item, subitem, "Comet.exe")))
|
|
@@ -364,6 +366,7 @@ def atlas_on_windows_path(browser_type=None):
|
|
|
364
366
|
):
|
|
365
367
|
for subitem in (
|
|
366
368
|
"Atlas/Application",
|
|
369
|
+
"Programs/Atlas",
|
|
367
370
|
):
|
|
368
371
|
try:
|
|
369
372
|
candidates.append(os.sep.join((item, subitem, "Atlas.exe")))
|
seleniumbase/core/sb_cdp.py
CHANGED
|
@@ -1029,12 +1029,19 @@ class CDPMethods():
|
|
|
1029
1029
|
return self.loop.run_until_complete(self.page.js_dumps(obj_name))
|
|
1030
1030
|
|
|
1031
1031
|
def maximize(self):
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
self.
|
|
1036
|
-
|
|
1037
|
-
|
|
1032
|
+
try:
|
|
1033
|
+
if self.get_window()[1].window_state.value == "maximized":
|
|
1034
|
+
return
|
|
1035
|
+
elif self.get_window()[1].window_state.value == "minimized":
|
|
1036
|
+
self.loop.run_until_complete(self.page.maximize())
|
|
1037
|
+
time.sleep(0.044)
|
|
1038
|
+
return self.loop.run_until_complete(self.page.maximize())
|
|
1039
|
+
except Exception:
|
|
1040
|
+
with suppress(Exception):
|
|
1041
|
+
width = self.evaluate("screen.availWidth;")
|
|
1042
|
+
height = self.evaluate("screen.availHeight;")
|
|
1043
|
+
self.__set_window_rect(0, 0, width, height)
|
|
1044
|
+
return
|
|
1038
1045
|
|
|
1039
1046
|
def minimize(self):
|
|
1040
1047
|
if self.get_window()[1].window_state.value != "minimized":
|
|
@@ -1725,18 +1732,18 @@ class CDPMethods():
|
|
|
1725
1732
|
win_x = window_rect["x"]
|
|
1726
1733
|
win_y = window_rect["y"]
|
|
1727
1734
|
scr_width = pyautogui.size().width
|
|
1728
|
-
self.
|
|
1729
|
-
self.__add_light_pause()
|
|
1730
|
-
win_width = self.get_window_size()["width"]
|
|
1735
|
+
win_width = self.evaluate("screen.availWidth;")
|
|
1731
1736
|
width_ratio = round(float(scr_width) / float(win_width), 2)
|
|
1732
1737
|
width_ratio += 0.01
|
|
1733
1738
|
if width_ratio < 0.45 or width_ratio > 2.55:
|
|
1734
1739
|
width_ratio = 1.01
|
|
1735
1740
|
sb_config._saved_width_ratio = width_ratio
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1741
|
+
with suppress(Exception):
|
|
1742
|
+
self.get_window() # If this fails, skip the rest
|
|
1743
|
+
self.minimize()
|
|
1744
|
+
self.__add_light_pause()
|
|
1745
|
+
self.__set_window_rect(win_x, win_y, width, height)
|
|
1746
|
+
self.__add_light_pause()
|
|
1740
1747
|
x = x * (width_ratio + 0.03)
|
|
1741
1748
|
y = y * (width_ratio - 0.03)
|
|
1742
1749
|
self.bring_active_window_to_front()
|
|
@@ -2021,18 +2028,18 @@ class CDPMethods():
|
|
|
2021
2028
|
win_x = window_rect["x"]
|
|
2022
2029
|
win_y = window_rect["y"]
|
|
2023
2030
|
scr_width = pyautogui.size().width
|
|
2024
|
-
self.
|
|
2025
|
-
self.__add_light_pause()
|
|
2026
|
-
win_width = self.get_window_size()["width"]
|
|
2031
|
+
win_width = self.evaluate("screen.availWidth;")
|
|
2027
2032
|
width_ratio = round(float(scr_width) / float(win_width), 2)
|
|
2028
2033
|
width_ratio += 0.01
|
|
2029
2034
|
if width_ratio < 0.45 or width_ratio > 2.55:
|
|
2030
2035
|
width_ratio = 1.01
|
|
2031
2036
|
sb_config._saved_width_ratio = width_ratio
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2037
|
+
with suppress(Exception):
|
|
2038
|
+
self.get_window() # If this fails, skip the rest
|
|
2039
|
+
self.minimize()
|
|
2040
|
+
self.__add_light_pause()
|
|
2041
|
+
self.__set_window_rect(win_x, win_y, width, height)
|
|
2042
|
+
self.__add_light_pause()
|
|
2036
2043
|
x1 = x1 * width_ratio
|
|
2037
2044
|
y1 = y1 * (width_ratio - 0.02)
|
|
2038
2045
|
x2 = x2 * width_ratio
|
|
@@ -2114,15 +2121,14 @@ class CDPMethods():
|
|
|
2114
2121
|
width_ratio = sb_config._saved_width_ratio
|
|
2115
2122
|
else:
|
|
2116
2123
|
scr_width = pyautogui.size().width
|
|
2117
|
-
self.
|
|
2118
|
-
self.__add_light_pause()
|
|
2119
|
-
win_width = self.get_window_size()["width"]
|
|
2124
|
+
win_width = self.evaluate("screen.availWidth;")
|
|
2120
2125
|
width_ratio = round(float(scr_width) / float(win_width), 2)
|
|
2121
2126
|
width_ratio += 0.01
|
|
2122
2127
|
if width_ratio < 0.45 or width_ratio > 2.55:
|
|
2123
2128
|
width_ratio = 1.01
|
|
2124
2129
|
sb_config._saved_width_ratio = width_ratio
|
|
2125
|
-
|
|
2130
|
+
with suppress(Exception):
|
|
2131
|
+
self.__set_window_rect(win_x, win_y, width, height)
|
|
2126
2132
|
self.__add_light_pause()
|
|
2127
2133
|
self.bring_active_window_to_front()
|
|
2128
2134
|
elif (
|
|
@@ -2694,6 +2700,13 @@ class CDPMethods():
|
|
|
2694
2700
|
self.loop.run_until_complete(self.page.evaluate(js_code))
|
|
2695
2701
|
self.loop.run_until_complete(self.page.wait())
|
|
2696
2702
|
|
|
2703
|
+
def scroll_by_y(self, y):
|
|
2704
|
+
y = int(y)
|
|
2705
|
+
js_code = "window.scrollBy(0, %s);" % y
|
|
2706
|
+
with suppress(Exception):
|
|
2707
|
+
self.loop.run_until_complete(self.page.evaluate(js_code))
|
|
2708
|
+
self.loop.run_until_complete(self.page.wait())
|
|
2709
|
+
|
|
2697
2710
|
def scroll_to_top(self):
|
|
2698
2711
|
js_code = "window.scrollTo(0, 0);"
|
|
2699
2712
|
with suppress(Exception):
|
|
@@ -2707,11 +2720,21 @@ class CDPMethods():
|
|
|
2707
2720
|
self.loop.run_until_complete(self.page.wait())
|
|
2708
2721
|
|
|
2709
2722
|
def scroll_up(self, amount=25):
|
|
2710
|
-
|
|
2723
|
+
"""Scrolls up as a percentage of the page."""
|
|
2724
|
+
try:
|
|
2725
|
+
self.loop.run_until_complete(self.page.scroll_up(amount))
|
|
2726
|
+
except Exception:
|
|
2727
|
+
amount = self.get_window_size()["height"] * amount / 100
|
|
2728
|
+
self.execute_script("window.scrollBy(0, -%s);" % amount)
|
|
2711
2729
|
self.loop.run_until_complete(self.page.wait())
|
|
2712
2730
|
|
|
2713
2731
|
def scroll_down(self, amount=25):
|
|
2714
|
-
|
|
2732
|
+
"""Scrolls down as a percentage of the page."""
|
|
2733
|
+
try:
|
|
2734
|
+
self.loop.run_until_complete(self.page.scroll_down(amount))
|
|
2735
|
+
except Exception:
|
|
2736
|
+
amount = self.get_window_size()["height"] * amount / 100
|
|
2737
|
+
self.execute_script("window.scrollBy(0, %s);" % amount)
|
|
2715
2738
|
self.loop.run_until_complete(self.page.wait())
|
|
2716
2739
|
|
|
2717
2740
|
def save_page_source(self, name, folder=None):
|
|
@@ -3577,9 +3577,18 @@ class BaseCase(unittest.TestCase):
|
|
|
3577
3577
|
self.cdp.maximize()
|
|
3578
3578
|
return
|
|
3579
3579
|
self._check_browser()
|
|
3580
|
-
|
|
3580
|
+
try:
|
|
3581
|
+
self.driver.maximize_window()
|
|
3582
|
+
except Exception:
|
|
3583
|
+
with suppress(Exception):
|
|
3584
|
+
width = self.execute_script("return screen.availWidth;")
|
|
3585
|
+
height = self.execute_script("return screen.availHeight;")
|
|
3586
|
+
self.set_window_rect(0, 0, width, height)
|
|
3581
3587
|
self.__demo_mode_pause_if_active(tiny=True)
|
|
3582
3588
|
|
|
3589
|
+
def maximize(self):
|
|
3590
|
+
self.maximize_window()
|
|
3591
|
+
|
|
3583
3592
|
def minimize_window(self):
|
|
3584
3593
|
self.__check_scope()
|
|
3585
3594
|
if self.__is_cdp_swap_needed():
|
|
@@ -3589,6 +3598,9 @@ class BaseCase(unittest.TestCase):
|
|
|
3589
3598
|
self.driver.minimize_window()
|
|
3590
3599
|
self.__demo_mode_pause_if_active(tiny=True)
|
|
3591
3600
|
|
|
3601
|
+
def minimize(self):
|
|
3602
|
+
self.minimize_window()
|
|
3603
|
+
|
|
3592
3604
|
def reset_window_size(self):
|
|
3593
3605
|
self.__check_scope()
|
|
3594
3606
|
if self.__is_cdp_swap_needed():
|
|
@@ -4344,7 +4356,7 @@ class BaseCase(unittest.TestCase):
|
|
|
4344
4356
|
if self.is_chromium():
|
|
4345
4357
|
try:
|
|
4346
4358
|
if self.maximize_option:
|
|
4347
|
-
self.
|
|
4359
|
+
self.maximize_window()
|
|
4348
4360
|
self.wait_for_ready_state_complete()
|
|
4349
4361
|
else:
|
|
4350
4362
|
pass # Now handled in browser_launcher.py
|
|
@@ -4354,7 +4366,7 @@ class BaseCase(unittest.TestCase):
|
|
|
4354
4366
|
elif self.browser == "firefox":
|
|
4355
4367
|
try:
|
|
4356
4368
|
if self.maximize_option:
|
|
4357
|
-
self.
|
|
4369
|
+
self.maximize_window()
|
|
4358
4370
|
self.wait_for_ready_state_complete()
|
|
4359
4371
|
else:
|
|
4360
4372
|
with suppress(Exception):
|
|
@@ -4364,7 +4376,7 @@ class BaseCase(unittest.TestCase):
|
|
|
4364
4376
|
elif self.browser == "safari":
|
|
4365
4377
|
if self.maximize_option:
|
|
4366
4378
|
try:
|
|
4367
|
-
self.
|
|
4379
|
+
self.maximize_window()
|
|
4368
4380
|
self.wait_for_ready_state_complete()
|
|
4369
4381
|
except Exception:
|
|
4370
4382
|
pass # Keep existing browser resolution
|
|
@@ -6511,6 +6523,34 @@ class BaseCase(unittest.TestCase):
|
|
|
6511
6523
|
self.execute_script(scroll_script)
|
|
6512
6524
|
time.sleep(0.012)
|
|
6513
6525
|
|
|
6526
|
+
def scroll_by_y(self, y):
|
|
6527
|
+
"""Scrolls page by y pixels."""
|
|
6528
|
+
self.__check_scope()
|
|
6529
|
+
y = int(y)
|
|
6530
|
+
if self.__is_cdp_swap_needed():
|
|
6531
|
+
self.cdp.scroll_by_y(y)
|
|
6532
|
+
return
|
|
6533
|
+
scroll_script = "window.scrollBy(0, %s);" % y
|
|
6534
|
+
with suppress(Exception):
|
|
6535
|
+
self.execute_script(scroll_script)
|
|
6536
|
+
time.sleep(0.012)
|
|
6537
|
+
|
|
6538
|
+
def scroll_up(self, amount=25):
|
|
6539
|
+
"""Scrolls up as a percentage of the page."""
|
|
6540
|
+
if self.__is_cdp_swap_needed():
|
|
6541
|
+
self.cdp.scroll_up(amount)
|
|
6542
|
+
return
|
|
6543
|
+
amount = self.get_window_size()["height"] * amount / 100
|
|
6544
|
+
self.execute_script("window.scrollBy(0, -%s);" % amount)
|
|
6545
|
+
|
|
6546
|
+
def scroll_down(self, amount=25):
|
|
6547
|
+
"""Scrolls down as a percentage of the page."""
|
|
6548
|
+
if self.__is_cdp_swap_needed():
|
|
6549
|
+
self.cdp.scroll_down(amount)
|
|
6550
|
+
return
|
|
6551
|
+
amount = self.get_window_size()["height"] * amount / 100
|
|
6552
|
+
self.execute_script("window.scrollBy(0, %s);" % amount)
|
|
6553
|
+
|
|
6514
6554
|
def click_xpath(self, xpath):
|
|
6515
6555
|
"""Technically, self.click() automatically detects xpath selectors,
|
|
6516
6556
|
so self.click_xpath() is just a longer name for the same action."""
|
|
@@ -11408,7 +11448,13 @@ class BaseCase(unittest.TestCase):
|
|
|
11408
11448
|
|
|
11409
11449
|
def __is_cdp_swap_needed(self):
|
|
11410
11450
|
"""If the driver is disconnected, use a CDP method when available."""
|
|
11411
|
-
|
|
11451
|
+
cdp_swap_needed = shared_utils.is_cdp_swap_needed(self.driver)
|
|
11452
|
+
if cdp_swap_needed:
|
|
11453
|
+
if not self.cdp:
|
|
11454
|
+
self.cdp = self.driver.cdp
|
|
11455
|
+
return True
|
|
11456
|
+
else:
|
|
11457
|
+
return False
|
|
11412
11458
|
|
|
11413
11459
|
############
|
|
11414
11460
|
|
|
@@ -14001,7 +14047,7 @@ class BaseCase(unittest.TestCase):
|
|
|
14001
14047
|
)
|
|
14002
14048
|
raise Exception(message)
|
|
14003
14049
|
except InvalidArgumentException:
|
|
14004
|
-
if not self.
|
|
14050
|
+
if not self.is_chromium():
|
|
14005
14051
|
raise
|
|
14006
14052
|
chrome_version = self.driver.capabilities["browserVersion"]
|
|
14007
14053
|
major_chrome_version = chrome_version.split(".")[0]
|
|
@@ -14616,7 +14662,7 @@ class BaseCase(unittest.TestCase):
|
|
|
14616
14662
|
try:
|
|
14617
14663
|
shadow_root = element.shadow_root
|
|
14618
14664
|
except Exception:
|
|
14619
|
-
if self.
|
|
14665
|
+
if self.is_chromium():
|
|
14620
14666
|
chrome_dict = self.driver.capabilities["chrome"]
|
|
14621
14667
|
chrome_dr_version = chrome_dict["chromedriverVersion"]
|
|
14622
14668
|
chromedriver_version = chrome_dr_version.split(" ")[0]
|
|
@@ -264,16 +264,13 @@ class Reveal:
|
|
|
264
264
|
|
|
265
265
|
|
|
266
266
|
class HighCharts:
|
|
267
|
+
LIB = "https://cdn.jsdelivr.net/npm/highcharts"
|
|
267
268
|
VER = "10.3.3"
|
|
268
|
-
HC_CSS = "
|
|
269
|
-
HC_JS = "
|
|
270
|
-
EXPORTING_JS = "
|
|
271
|
-
EXPORT_DATA_JS = (
|
|
272
|
-
|
|
273
|
-
)
|
|
274
|
-
ACCESSIBILITY_JS = (
|
|
275
|
-
"https://code.highcharts.com/%s/modules/accessibility.js" % VER
|
|
276
|
-
)
|
|
269
|
+
HC_CSS = "%s@%s/css/highcharts.css" % (LIB, VER)
|
|
270
|
+
HC_JS = "%s@%s/highcharts.js" % (LIB, VER)
|
|
271
|
+
EXPORTING_JS = "%s@%s/modules/exporting.js" % (LIB, VER)
|
|
272
|
+
EXPORT_DATA_JS = "%s@%s/modules/export-data.js" % (LIB, VER)
|
|
273
|
+
ACCESSIBILITY_JS = "%s@%s/modules/accessibility.js" % (LIB, VER)
|
|
277
274
|
|
|
278
275
|
|
|
279
276
|
class BootstrapTour:
|
|
@@ -1530,7 +1530,7 @@ def save_page_source(driver, name, folder=None):
|
|
|
1530
1530
|
rendered_source = log_helper.get_html_source_with_base_href(
|
|
1531
1531
|
driver, page_source
|
|
1532
1532
|
)
|
|
1533
|
-
html_file = open(html_file_path, "w+", "utf-8")
|
|
1533
|
+
html_file = open(html_file_path, mode="w+", encoding="utf-8")
|
|
1534
1534
|
html_file.write(rendered_source)
|
|
1535
1535
|
html_file.close()
|
|
1536
1536
|
|
|
@@ -455,8 +455,6 @@ def Driver(
|
|
|
455
455
|
)
|
|
456
456
|
if sb_config._browser_shortcut:
|
|
457
457
|
browser = sb_config._browser_shortcut
|
|
458
|
-
if browser in constants.ChromiumSubs.chromium_subs:
|
|
459
|
-
browser = "chrome" # Still uses chromedriver
|
|
460
458
|
if headless is None:
|
|
461
459
|
if "--headless" in sys_argv:
|
|
462
460
|
headless = True
|
|
@@ -953,6 +951,10 @@ def Driver(
|
|
|
953
951
|
driver_version = None
|
|
954
952
|
break
|
|
955
953
|
count += 1
|
|
954
|
+
if browser in constants.ChromiumSubs.chromium_subs:
|
|
955
|
+
if not binary_location:
|
|
956
|
+
browser = "chrome" # Still uses chromedriver
|
|
957
|
+
sb_config._browser_shortcut = browser
|
|
956
958
|
browser_name = browser
|
|
957
959
|
|
|
958
960
|
# Launch a web browser
|
|
@@ -1676,8 +1676,23 @@ def pytest_configure(config):
|
|
|
1676
1676
|
sb_config.browser = config.getoption("browser")
|
|
1677
1677
|
if sb_config._browser_shortcut:
|
|
1678
1678
|
sb_config.browser = sb_config._browser_shortcut
|
|
1679
|
-
|
|
1680
|
-
|
|
1679
|
+
elif sys_argv == ["-c"]: # Multithreading messes with args
|
|
1680
|
+
if config.getoption("use_opera"):
|
|
1681
|
+
bin_loc = detect_b_ver.get_binary_location("opera")
|
|
1682
|
+
if bin_loc and os.path.exists(bin_loc):
|
|
1683
|
+
sb_config.browser = "opera"
|
|
1684
|
+
elif config.getoption("use_brave"):
|
|
1685
|
+
bin_loc = detect_b_ver.get_binary_location("brave")
|
|
1686
|
+
if bin_loc and os.path.exists(bin_loc):
|
|
1687
|
+
sb_config.browser = "brave"
|
|
1688
|
+
elif config.getoption("use_comet"):
|
|
1689
|
+
bin_loc = detect_b_ver.get_binary_location("comet")
|
|
1690
|
+
if bin_loc and os.path.exists(bin_loc):
|
|
1691
|
+
sb_config.browser = "comet"
|
|
1692
|
+
elif config.getoption("use_atlas"):
|
|
1693
|
+
bin_loc = detect_b_ver.get_binary_location("atlas")
|
|
1694
|
+
if bin_loc and os.path.exists(bin_loc):
|
|
1695
|
+
sb_config.browser = "atlas"
|
|
1681
1696
|
sb_config.account = config.getoption("account")
|
|
1682
1697
|
sb_config.data = config.getoption("data")
|
|
1683
1698
|
sb_config.var1 = config.getoption("var1")
|
|
@@ -1714,6 +1729,35 @@ def pytest_configure(config):
|
|
|
1714
1729
|
sb_config.binary_location = config.getoption("binary_location")
|
|
1715
1730
|
if hasattr(sb_config, "_cdp_bin_loc") and sb_config._cdp_bin_loc:
|
|
1716
1731
|
sb_config.binary_location = sb_config._cdp_bin_loc
|
|
1732
|
+
elif not sb_config.binary_location:
|
|
1733
|
+
if (
|
|
1734
|
+
config.getoption("use_opera")
|
|
1735
|
+
or sb_config._browser_shortcut == "opera"
|
|
1736
|
+
):
|
|
1737
|
+
bin_loc = detect_b_ver.get_binary_location("opera")
|
|
1738
|
+
if bin_loc and os.path.exists(bin_loc):
|
|
1739
|
+
sb_config.binary_location = bin_loc
|
|
1740
|
+
elif (
|
|
1741
|
+
config.getoption("use_brave")
|
|
1742
|
+
or sb_config._browser_shortcut == "brave"
|
|
1743
|
+
):
|
|
1744
|
+
bin_loc = detect_b_ver.get_binary_location("brave")
|
|
1745
|
+
if bin_loc and os.path.exists(bin_loc):
|
|
1746
|
+
sb_config.binary_location = bin_loc
|
|
1747
|
+
elif (
|
|
1748
|
+
config.getoption("use_comet")
|
|
1749
|
+
or sb_config._browser_shortcut == "comet"
|
|
1750
|
+
):
|
|
1751
|
+
bin_loc = detect_b_ver.get_binary_location("comet")
|
|
1752
|
+
if bin_loc and os.path.exists(bin_loc):
|
|
1753
|
+
sb_config.binary_location = bin_loc
|
|
1754
|
+
elif (
|
|
1755
|
+
config.getoption("use_atlas")
|
|
1756
|
+
or sb_config._browser_shortcut == "atlas"
|
|
1757
|
+
):
|
|
1758
|
+
bin_loc = detect_b_ver.get_binary_location("atlas")
|
|
1759
|
+
if bin_loc and os.path.exists(bin_loc):
|
|
1760
|
+
sb_config.binary_location = bin_loc
|
|
1717
1761
|
if config.getoption("use_cft") and not sb_config.binary_location:
|
|
1718
1762
|
sb_config.binary_location = "cft"
|
|
1719
1763
|
elif config.getoption("use_chs") and not sb_config.binary_location:
|
|
@@ -1726,6 +1770,10 @@ def pytest_configure(config):
|
|
|
1726
1770
|
sb_config.headless = True
|
|
1727
1771
|
sb_config.headless1 = False
|
|
1728
1772
|
sb_config.headless2 = False
|
|
1773
|
+
if sb_config.browser in constants.ChromiumSubs.chromium_subs:
|
|
1774
|
+
if not sb_config.binary_location:
|
|
1775
|
+
sb_config.browser = "chrome" # Still uses chromedriver
|
|
1776
|
+
sb_config._browser_shortcut = sb_config.browser
|
|
1729
1777
|
sb_config.driver_version = config.getoption("driver_version")
|
|
1730
1778
|
sb_config.page_load_strategy = config.getoption("page_load_strategy")
|
|
1731
1779
|
sb_config.with_testing_base = config.getoption("with_testing_base")
|
|
@@ -1132,8 +1132,6 @@ def SB(
|
|
|
1132
1132
|
sb_config.browser = browser
|
|
1133
1133
|
if sb_config._browser_shortcut:
|
|
1134
1134
|
sb_config.browser = sb_config._browser_shortcut
|
|
1135
|
-
if sb_config.browser in constants.ChromiumSubs.chromium_subs:
|
|
1136
|
-
sb_config.browser = "chrome" # Still uses chromedriver
|
|
1137
1135
|
if not hasattr(sb_config, "is_behave"):
|
|
1138
1136
|
sb_config.is_behave = False
|
|
1139
1137
|
if not hasattr(sb_config, "is_pytest"):
|
|
@@ -1242,6 +1240,10 @@ def SB(
|
|
|
1242
1240
|
sb_config.interval = interval
|
|
1243
1241
|
sb_config.cap_file = cap_file
|
|
1244
1242
|
sb_config.cap_string = cap_string
|
|
1243
|
+
if sb_config.browser in constants.ChromiumSubs.chromium_subs:
|
|
1244
|
+
if not sb_config.binary_location:
|
|
1245
|
+
sb_config.browser = "chrome" # Still uses chromedriver
|
|
1246
|
+
sb_config._browser_shortcut = sb_config.browser
|
|
1245
1247
|
|
|
1246
1248
|
sb = BaseCase()
|
|
1247
1249
|
sb.with_testing_base = sb_config.with_testing_base
|
|
@@ -1302,8 +1302,6 @@ class SeleniumBrowser(Plugin):
|
|
|
1302
1302
|
if sb_config._browser_shortcut:
|
|
1303
1303
|
self.options.browser = sb_config._browser_shortcut
|
|
1304
1304
|
test.test.browser = sb_config._browser_shortcut
|
|
1305
|
-
if test.test.browser in constants.ChromiumSubs.chromium_subs:
|
|
1306
|
-
test.test.browser = "chrome" # Still uses chromedriver
|
|
1307
1305
|
test.test.cap_file = self.options.cap_file
|
|
1308
1306
|
test.test.cap_string = self.options.cap_string
|
|
1309
1307
|
test.test.headless = self.options.headless
|
|
@@ -1355,6 +1353,10 @@ class SeleniumBrowser(Plugin):
|
|
|
1355
1353
|
test.test.headless = True
|
|
1356
1354
|
test.test.headless1 = False
|
|
1357
1355
|
test.test.headless2 = False
|
|
1356
|
+
if test.test.browser in constants.ChromiumSubs.chromium_subs:
|
|
1357
|
+
if not sb_config.binary_location:
|
|
1358
|
+
test.test.browser = "chrome" # Still uses chromedriver
|
|
1359
|
+
sb_config._browser_shortcut = test.test.browser
|
|
1358
1360
|
test.test.driver_version = self.options.driver_version
|
|
1359
1361
|
test.test.page_load_strategy = self.options.page_load_strategy
|
|
1360
1362
|
test.test.chromium_arg = self.options.chromium_arg
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: seleniumbase
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.44.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
|
|
@@ -60,7 +60,7 @@ Requires-Python: >=3.8
|
|
|
60
60
|
Description-Content-Type: text/markdown
|
|
61
61
|
License-File: LICENSE
|
|
62
62
|
Requires-Dist: pip>=25.0.1; python_version < "3.9"
|
|
63
|
-
Requires-Dist: pip>=25.
|
|
63
|
+
Requires-Dist: pip>=25.3; python_version >= "3.9"
|
|
64
64
|
Requires-Dist: packaging>=25.0
|
|
65
65
|
Requires-Dist: setuptools~=70.2; python_version < "3.10"
|
|
66
66
|
Requires-Dist: setuptools>=80.9.0; python_version >= "3.10"
|
|
@@ -113,7 +113,7 @@ Requires-Dist: websocket-client~=1.8.0; python_version < "3.9"
|
|
|
113
113
|
Requires-Dist: websocket-client~=1.9.0; python_version >= "3.9"
|
|
114
114
|
Requires-Dist: selenium==4.27.1; python_version < "3.9"
|
|
115
115
|
Requires-Dist: selenium==4.32.0; python_version >= "3.9" and python_version < "3.10"
|
|
116
|
-
Requires-Dist: selenium==4.
|
|
116
|
+
Requires-Dist: selenium==4.38.0; python_version >= "3.10"
|
|
117
117
|
Requires-Dist: cssselect==1.2.0; python_version < "3.9"
|
|
118
118
|
Requires-Dist: cssselect==1.3.0; python_version >= "3.9"
|
|
119
119
|
Requires-Dist: sortedcontainers==2.4.0
|
|
@@ -3,7 +3,7 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
|
|
|
3
3
|
sbase/steps.py,sha256=wiPSWZhFpBlWvkqXRJ18btpBu3nQaw9K5AzIJNAX5RM,43521
|
|
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=cycg5W9jgt4aWBhVgu1_HNoOZVDHvJGt5mqmujcE0Fg,46
|
|
7
7
|
seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
seleniumbase/behave/behave_helper.py,sha256=lJtagtivSbEpbRj0EKV4l4PuPU6NANONJJAnYwgVCe0,24379
|
|
9
9
|
seleniumbase/behave/behave_sb.py,sha256=dEj9UUHVz3ejzEX25frViPQfp7acjI-UssWJO_wpugg,59875
|
|
@@ -36,11 +36,11 @@ seleniumbase/console_scripts/sb_print.py,sha256=iUKR71Y82NhuKBKw31PJilDw-pPUr-vq
|
|
|
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=pcAwr3DUyiQLORyltJ8CIPSx6NarPH--cyon5NsbfhU,255248
|
|
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
|
|
43
|
-
seleniumbase/core/detect_b_ver.py,sha256=
|
|
43
|
+
seleniumbase/core/detect_b_ver.py,sha256=2vnZ4ROeNnGGuQgWfrcbTyVH8MN0Lh_mWDQ0Po0-1YM,21737
|
|
44
44
|
seleniumbase/core/download_helper.py,sha256=qSR54kQISucF4RQaLCOuuerSu6DR41juGi_30HVvWYY,2943
|
|
45
45
|
seleniumbase/core/encoded_images.py,sha256=rDKJ4cNJSuKiRcFViYU7bjyTS9_moI57gUPRXVg3u2k,14209
|
|
46
46
|
seleniumbase/core/jqc_helper.py,sha256=2DDQr9Q2jSSZqFzX588jLlUM9oJvyrRWq2aORSIPUdI,10322
|
|
@@ -50,7 +50,7 @@ seleniumbase/core/proxy_helper.py,sha256=pZ1NboNfziHU3vWZLOZLX-qkfM3oKSnpc3omQf9
|
|
|
50
50
|
seleniumbase/core/recorder_helper.py,sha256=gDION28OK4NAYsE-7ohKZ9Z3sxQQ0FEjf859LDpqsg4,25320
|
|
51
51
|
seleniumbase/core/report_helper.py,sha256=Obg5wHltEmM6uFCWFeR8_fjeT0GzHjGgoqQIr_HUxxk,12223
|
|
52
52
|
seleniumbase/core/s3_manager.py,sha256=z_4qx2jI_gtK5r3niGXgEOBpfMUicUCOciowai50MP4,3529
|
|
53
|
-
seleniumbase/core/sb_cdp.py,sha256=
|
|
53
|
+
seleniumbase/core/sb_cdp.py,sha256=85E5QCLOI_8s7I40EoM7-U1GeOypQuw0aH5CB8oKtUE,110503
|
|
54
54
|
seleniumbase/core/sb_driver.py,sha256=-IQsskc7HpXQbcBL04IPjmGpyYchyo7v9OPF2WcahDw,14159
|
|
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
|
|
@@ -71,12 +71,12 @@ seleniumbase/extensions/disable_csp.zip,sha256=5RvomXnm2PdivUVcxTV6jfvD8WhTEsQYH
|
|
|
71
71
|
seleniumbase/extensions/recorder.zip,sha256=JEE_FVEvlS63cFQbVLEroIyPSS91nWCDL0MhjVrmIpk,11813
|
|
72
72
|
seleniumbase/extensions/sbase_ext.zip,sha256=3s1N8zrVaMz8RQEOIoBzC3KDjtmHwVZRvVsX25Odr_s,8175
|
|
73
73
|
seleniumbase/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
74
|
-
seleniumbase/fixtures/base_case.py,sha256=
|
|
75
|
-
seleniumbase/fixtures/constants.py,sha256=
|
|
74
|
+
seleniumbase/fixtures/base_case.py,sha256=R-yNQjqDwAROf4vVR3J4u74BU0iKrJ2TyLL3fKdMW3s,742846
|
|
75
|
+
seleniumbase/fixtures/constants.py,sha256=xDcfW_O7TCfiojm_oxhNGY11mSEfR-ckvbppfARPWQU,14281
|
|
76
76
|
seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3O5hSnEKA,1954
|
|
77
77
|
seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
|
|
78
78
|
seleniumbase/fixtures/js_utils.py,sha256=iNMn4soCRIuyjYG0vUHZX5zWEKSR8RgGDsl9Y74DFP8,52843
|
|
79
|
-
seleniumbase/fixtures/page_actions.py,sha256=
|
|
79
|
+
seleniumbase/fixtures/page_actions.py,sha256=06tpHzyw7frpFfRWEqKWhn0_76BQFIqRK_xAwmr2bSk,73206
|
|
80
80
|
seleniumbase/fixtures/page_utils.py,sha256=auaUAuV2ctRNPUnGWuHS22Il0Ml0PPHmxtikVZdM2tc,12277
|
|
81
81
|
seleniumbase/fixtures/shared_utils.py,sha256=kn0rcF0tEkQkiT8RGVooNFsLnVWmdPeTH9PfIm86TOI,10527
|
|
82
82
|
seleniumbase/fixtures/unittest_helper.py,sha256=sfZ92rZeBAn_sF_yQ3I6_I7h3lyU5-cV_UMegBNoEm8,1294
|
|
@@ -92,13 +92,13 @@ seleniumbase/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
|
92
92
|
seleniumbase/plugins/base_plugin.py,sha256=ItLgtaZmu_363iycy8BNX0Do5LyIWGiTMLW6krXM-WQ,14748
|
|
93
93
|
seleniumbase/plugins/basic_test_info.py,sha256=nvQxLMxD4pgjY3dGHlMAxmHXP0LIhcOIfWjNue-49uk,2108
|
|
94
94
|
seleniumbase/plugins/db_reporting_plugin.py,sha256=En09qUCoojrk9-vbcnsoHdSELoGmag2GDIyu3jTiJas,7331
|
|
95
|
-
seleniumbase/plugins/driver_manager.py,sha256=
|
|
95
|
+
seleniumbase/plugins/driver_manager.py,sha256=CwKkvgtcHue8m6oJSrxYJvWIu2i5P41u05bOzoFMrYE,41861
|
|
96
96
|
seleniumbase/plugins/page_source.py,sha256=mifv7Rkkb9qcrFY2H-9fctoR1CpHHiCgnFTOY2p7mBY,1889
|
|
97
|
-
seleniumbase/plugins/pytest_plugin.py,sha256=
|
|
97
|
+
seleniumbase/plugins/pytest_plugin.py,sha256=A4UBkiLmSakFRUWnOCWF7KLM34yZpHEJPCpyS0P8ftA,116633
|
|
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=pXjjXqaO8NthZ-ZiRBnrsOQyDtsdASYQvfSoggnXHwU,63511
|
|
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=nFdKEHRLcAfoTJqhpd3Drl5F_-ZtP6nwgV69pqZcKGQ,66104
|
|
102
102
|
seleniumbase/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
103
103
|
seleniumbase/translate/__init__.py,sha256=N2i5XntTwJZmwr9-qvdX5gC6Rdm5-ClIbnQ8yyPn4Oo,459
|
|
104
104
|
seleniumbase/translate/chinese.py,sha256=0QhK2eadtsdN4KCvwki1J7jBCe8I4xxWbKzteJKJozY,24698
|
|
@@ -141,9 +141,9 @@ seleniumbase/utilities/selenium_grid/start-grid-hub.bat,sha256=Ftq-GrAKRYH2ssDPr
|
|
|
141
141
|
seleniumbase/utilities/selenium_grid/start-grid-hub.sh,sha256=KADv0RUHONLL2_I443QFK8PryBpDmKn5Gy0s4o0vDSM,106
|
|
142
142
|
seleniumbase/utilities/selenium_ide/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
143
143
|
seleniumbase/utilities/selenium_ide/convert_ide.py,sha256=2tayFP_R9HGH0Xx6qYlPmArN0THntO6R0Wjo0qqgCZY,31680
|
|
144
|
-
seleniumbase-4.
|
|
145
|
-
seleniumbase-4.
|
|
146
|
-
seleniumbase-4.
|
|
147
|
-
seleniumbase-4.
|
|
148
|
-
seleniumbase-4.
|
|
149
|
-
seleniumbase-4.
|
|
144
|
+
seleniumbase-4.44.0.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
|
|
145
|
+
seleniumbase-4.44.0.dist-info/METADATA,sha256=F0MF6p_zPnyhtLWtTo2ztHEymQRNWG43Es1lq68ZVWE,90492
|
|
146
|
+
seleniumbase-4.44.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
147
|
+
seleniumbase-4.44.0.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
|
148
|
+
seleniumbase-4.44.0.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
|
149
|
+
seleniumbase-4.44.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|