seleniumbase 4.32.12__py3-none-any.whl → 4.33.1__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- seleniumbase/__version__.py +1 -1
- seleniumbase/core/browser_launcher.py +24 -10
- seleniumbase/core/sb_cdp.py +16 -8
- seleniumbase/core/sb_driver.py +31 -0
- seleniumbase/fixtures/base_case.py +35 -0
- seleniumbase/fixtures/js_utils.py +8 -0
- seleniumbase/plugins/sb_manager.py +7 -1
- seleniumbase/undetected/cdp_driver/browser.py +7 -10
- {seleniumbase-4.32.12.dist-info → seleniumbase-4.33.1.dist-info}/METADATA +19 -18
- {seleniumbase-4.32.12.dist-info → seleniumbase-4.33.1.dist-info}/RECORD +14 -14
- {seleniumbase-4.32.12.dist-info → seleniumbase-4.33.1.dist-info}/WHEEL +1 -1
- {seleniumbase-4.32.12.dist-info → seleniumbase-4.33.1.dist-info}/LICENSE +0 -0
- {seleniumbase-4.32.12.dist-info → seleniumbase-4.33.1.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.32.12.dist-info → seleniumbase-4.33.1.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.33.1"
|
@@ -216,8 +216,10 @@ def extend_driver(driver):
|
|
216
216
|
driver.get_text = DM.get_text
|
217
217
|
driver.get_active_element_css = DM.get_active_element_css
|
218
218
|
driver.get_locale_code = DM.get_locale_code
|
219
|
+
driver.get_screen_rect = DM.get_screen_rect
|
219
220
|
driver.get_origin = DM.get_origin
|
220
221
|
driver.get_user_agent = DM.get_user_agent
|
222
|
+
driver.get_cookie_string = DM.get_cookie_string
|
221
223
|
driver.highlight = DM.highlight
|
222
224
|
driver.highlight_click = DM.highlight_click
|
223
225
|
driver.highlight_if_visible = DM.highlight_if_visible
|
@@ -234,6 +236,7 @@ def extend_driver(driver):
|
|
234
236
|
driver.switch_to_window = DM.switch_to_window
|
235
237
|
driver.switch_to_tab = DM.switch_to_tab
|
236
238
|
driver.switch_to_frame = DM.switch_to_frame
|
239
|
+
driver.reset_window_size = DM.reset_window_size
|
237
240
|
if hasattr(driver, "proxy"):
|
238
241
|
driver.set_wire_proxy = DM.set_wire_proxy
|
239
242
|
return driver
|
@@ -609,6 +612,7 @@ def uc_open_with_cdp_mode(driver, url=None):
|
|
609
612
|
cdp.save_cookies = CDPM.save_cookies
|
610
613
|
cdp.load_cookies = CDPM.load_cookies
|
611
614
|
cdp.clear_cookies = CDPM.clear_cookies
|
615
|
+
cdp.sleep = CDPM.sleep
|
612
616
|
cdp.bring_active_window_to_front = CDPM.bring_active_window_to_front
|
613
617
|
cdp.bring_to_front = CDPM.bring_active_window_to_front
|
614
618
|
cdp.get_active_element = CDPM.get_active_element
|
@@ -681,6 +685,7 @@ def uc_open_with_cdp_mode(driver, url=None):
|
|
681
685
|
cdp.select_if_unselected = CDPM.select_if_unselected
|
682
686
|
cdp.unselect_if_selected = CDPM.unselect_if_selected
|
683
687
|
cdp.is_checked = CDPM.is_checked
|
688
|
+
cdp.is_selected = CDPM.is_selected
|
684
689
|
cdp.is_element_present = CDPM.is_element_present
|
685
690
|
cdp.is_element_visible = CDPM.is_element_visible
|
686
691
|
cdp.wait_for_element_visible = CDPM.wait_for_element_visible
|
@@ -696,6 +701,8 @@ def uc_open_with_cdp_mode(driver, url=None):
|
|
696
701
|
cdp.assert_url_contains = CDPM.assert_url_contains
|
697
702
|
cdp.assert_text = CDPM.assert_text
|
698
703
|
cdp.assert_exact_text = CDPM.assert_exact_text
|
704
|
+
cdp.assert_true = CDPM.assert_true
|
705
|
+
cdp.assert_false = CDPM.assert_false
|
699
706
|
cdp.scroll_into_view = CDPM.scroll_into_view
|
700
707
|
cdp.scroll_to_y = CDPM.scroll_to_y
|
701
708
|
cdp.scroll_to_top = CDPM.scroll_to_top
|
@@ -1164,7 +1171,12 @@ def _uc_gui_click_captcha(
|
|
1164
1171
|
frame = "%s div" % frame
|
1165
1172
|
elif (
|
1166
1173
|
driver.is_element_present('[name*="cf-turnstile-"]')
|
1167
|
-
and driver.is_element_present(
|
1174
|
+
and driver.is_element_present("#challenge-form div > div")
|
1175
|
+
):
|
1176
|
+
frame = "#challenge-form div > div"
|
1177
|
+
elif (
|
1178
|
+
driver.is_element_present('[name*="cf-turnstile-"]')
|
1179
|
+
and driver.is_element_present("[class*=spacer] + div div")
|
1168
1180
|
):
|
1169
1181
|
frame = '[class*=spacer] + div div'
|
1170
1182
|
elif (
|
@@ -1237,8 +1249,8 @@ def _uc_gui_click_captcha(
|
|
1237
1249
|
return
|
1238
1250
|
try:
|
1239
1251
|
if ctype == "g_rc" and not driver.is_connected():
|
1240
|
-
x = (i_x +
|
1241
|
-
y = (i_y +
|
1252
|
+
x = (i_x + 29) * width_ratio
|
1253
|
+
y = (i_y + 35) * width_ratio
|
1242
1254
|
elif visible_iframe:
|
1243
1255
|
selector = "span"
|
1244
1256
|
if ctype == "g_rc":
|
@@ -1253,8 +1265,8 @@ def _uc_gui_click_captcha(
|
|
1253
1265
|
y = i_y + element.rect["y"] + (element.rect["height"] / 2.0)
|
1254
1266
|
y += 0.5
|
1255
1267
|
else:
|
1256
|
-
x = (i_x +
|
1257
|
-
y = (i_y +
|
1268
|
+
x = (i_x + 32) * width_ratio
|
1269
|
+
y = (i_y + 32) * width_ratio
|
1258
1270
|
if driver.is_connected():
|
1259
1271
|
driver.switch_to.default_content()
|
1260
1272
|
except Exception:
|
@@ -1494,6 +1506,7 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
|
|
1494
1506
|
tab_count += 1
|
1495
1507
|
time.sleep(0.027)
|
1496
1508
|
active_element_css = js_utils.get_active_element_css(driver)
|
1509
|
+
print(active_element_css)
|
1497
1510
|
if (
|
1498
1511
|
active_element_css.startswith(selector)
|
1499
1512
|
or active_element_css.endswith(" > div" * 2)
|
@@ -1511,7 +1524,10 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
|
|
1511
1524
|
except Exception:
|
1512
1525
|
return
|
1513
1526
|
if (
|
1514
|
-
|
1527
|
+
(
|
1528
|
+
driver.is_element_present(".footer .clearfix .ray-id")
|
1529
|
+
or driver.is_element_present("script[data-cf-beacon]")
|
1530
|
+
)
|
1515
1531
|
and hasattr(sb_config, "_saved_cf_tab_count")
|
1516
1532
|
and sb_config._saved_cf_tab_count
|
1517
1533
|
):
|
@@ -2447,10 +2463,8 @@ def _set_firefox_options(
|
|
2447
2463
|
firefox_arg_list = firefox_arg.split(",")
|
2448
2464
|
for firefox_arg_item in firefox_arg_list:
|
2449
2465
|
firefox_arg_item = firefox_arg_item.strip()
|
2450
|
-
if not firefox_arg_item.startswith("
|
2451
|
-
if firefox_arg_item.
|
2452
|
-
firefox_arg_item = "-" + firefox_arg_item
|
2453
|
-
else:
|
2466
|
+
if not firefox_arg_item.startswith("-"):
|
2467
|
+
if firefox_arg_item.count(os.sep) == 0:
|
2454
2468
|
firefox_arg_item = "--" + firefox_arg_item
|
2455
2469
|
if len(firefox_arg_item) >= 3:
|
2456
2470
|
options.add_argument(firefox_arg_item)
|
seleniumbase/core/sb_cdp.py
CHANGED
@@ -551,7 +551,7 @@ class CDPMethods():
|
|
551
551
|
if (width != 0 or height != 0):
|
552
552
|
element.click()
|
553
553
|
click_count += 1
|
554
|
-
time.sleep(0.
|
554
|
+
time.sleep(0.044)
|
555
555
|
self.__slow_mode_pause_if_set()
|
556
556
|
self.loop.run_until_complete(self.page.wait())
|
557
557
|
except Exception:
|
@@ -668,10 +668,10 @@ class CDPMethods():
|
|
668
668
|
text = text[:-1]
|
669
669
|
for key in text:
|
670
670
|
element.send_keys(key)
|
671
|
-
time.sleep(0.
|
671
|
+
time.sleep(0.044)
|
672
672
|
if submit:
|
673
673
|
element.send_keys("\r\n")
|
674
|
-
time.sleep(0.
|
674
|
+
time.sleep(0.044)
|
675
675
|
self.__slow_mode_pause_if_set()
|
676
676
|
self.loop.run_until_complete(self.page.wait())
|
677
677
|
|
@@ -741,7 +741,7 @@ class CDPMethods():
|
|
741
741
|
return
|
742
742
|
elif self.get_window()[1].window_state.value == "minimized":
|
743
743
|
self.loop.run_until_complete(self.page.maximize())
|
744
|
-
time.sleep(0.
|
744
|
+
time.sleep(0.044)
|
745
745
|
return self.loop.run_until_complete(self.page.maximize())
|
746
746
|
|
747
747
|
def minimize(self):
|
@@ -751,7 +751,7 @@ class CDPMethods():
|
|
751
751
|
def medimize(self):
|
752
752
|
if self.get_window()[1].window_state.value == "minimized":
|
753
753
|
self.loop.run_until_complete(self.page.medimize())
|
754
|
-
time.sleep(0.
|
754
|
+
time.sleep(0.044)
|
755
755
|
return self.loop.run_until_complete(self.page.medimize())
|
756
756
|
|
757
757
|
def set_window_rect(self, x, y, width, height):
|
@@ -760,7 +760,7 @@ class CDPMethods():
|
|
760
760
|
self.page.set_window_size(
|
761
761
|
left=x, top=y, width=width, height=height)
|
762
762
|
)
|
763
|
-
time.sleep(0.
|
763
|
+
time.sleep(0.044)
|
764
764
|
return self.loop.run_until_complete(
|
765
765
|
self.page.set_window_size(
|
766
766
|
left=x, top=y, width=width, height=height)
|
@@ -1125,7 +1125,7 @@ class CDPMethods():
|
|
1125
1125
|
)
|
1126
1126
|
with gui_lock:
|
1127
1127
|
pyautogui.press(key)
|
1128
|
-
time.sleep(0.
|
1128
|
+
time.sleep(0.044)
|
1129
1129
|
self.__slow_mode_pause_if_set()
|
1130
1130
|
self.loop.run_until_complete(self.page.wait())
|
1131
1131
|
|
@@ -1139,7 +1139,7 @@ class CDPMethods():
|
|
1139
1139
|
with gui_lock:
|
1140
1140
|
for key in keys:
|
1141
1141
|
pyautogui.press(key)
|
1142
|
-
time.sleep(0.
|
1142
|
+
time.sleep(0.044)
|
1143
1143
|
self.__slow_mode_pause_if_set()
|
1144
1144
|
self.loop.run_until_complete(self.page.wait())
|
1145
1145
|
|
@@ -1681,6 +1681,14 @@ class CDPMethods():
|
|
1681
1681
|
% (text, element.text_all, selector)
|
1682
1682
|
)
|
1683
1683
|
|
1684
|
+
def assert_true(self, expression):
|
1685
|
+
if not expression:
|
1686
|
+
raise AssertionError("%s is not true")
|
1687
|
+
|
1688
|
+
def assert_false(self, expression):
|
1689
|
+
if expression:
|
1690
|
+
raise AssertionError("%s is not false")
|
1691
|
+
|
1684
1692
|
def scroll_into_view(self, selector):
|
1685
1693
|
self.find_element(selector).scroll_into_view()
|
1686
1694
|
self.loop.run_until_complete(self.page.wait())
|
seleniumbase/core/sb_driver.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
"""Add new methods to extend the driver"""
|
2
2
|
from contextlib import suppress
|
3
3
|
from selenium.webdriver.remote.webelement import WebElement
|
4
|
+
from seleniumbase.config import settings
|
4
5
|
from seleniumbase.fixtures import js_utils
|
5
6
|
from seleniumbase.fixtures import page_actions
|
6
7
|
from seleniumbase.fixtures import page_utils
|
@@ -189,6 +190,8 @@ class DriverMethods():
|
|
189
190
|
return False
|
190
191
|
|
191
192
|
def is_online(self):
|
193
|
+
if self.__is_cdp_swap_needed():
|
194
|
+
return self.driver.cdp.evaluate("navigator.onLine;")
|
192
195
|
return self.driver.execute_script("return navigator.onLine;")
|
193
196
|
|
194
197
|
def is_connected(self):
|
@@ -231,17 +234,35 @@ class DriverMethods():
|
|
231
234
|
return page_actions.get_text(self.driver, *args, **kwargs)
|
232
235
|
|
233
236
|
def get_active_element_css(self, *args, **kwargs):
|
237
|
+
if self.__is_cdp_swap_needed():
|
238
|
+
return self.driver.cdp.get_active_element_css()
|
234
239
|
return js_utils.get_active_element_css(self.driver, *args, **kwargs)
|
235
240
|
|
236
241
|
def get_locale_code(self, *args, **kwargs):
|
242
|
+
if self.__is_cdp_swap_needed():
|
243
|
+
return self.driver.cdp.get_locale_code()
|
237
244
|
return js_utils.get_locale_code(self.driver, *args, **kwargs)
|
238
245
|
|
246
|
+
def get_screen_rect(self, *args, **kwargs):
|
247
|
+
if self.__is_cdp_swap_needed():
|
248
|
+
return self.driver.cdp.get_screen_rect()
|
249
|
+
return js_utils.get_screen_rect(self.driver, *args, **kwargs)
|
250
|
+
|
239
251
|
def get_origin(self, *args, **kwargs):
|
252
|
+
if self.__is_cdp_swap_needed():
|
253
|
+
return self.driver.cdp.get_origin()
|
240
254
|
return js_utils.get_origin(self.driver, *args, **kwargs)
|
241
255
|
|
242
256
|
def get_user_agent(self, *args, **kwargs):
|
257
|
+
if self.__is_cdp_swap_needed():
|
258
|
+
return self.driver.cdp.get_user_agent()
|
243
259
|
return js_utils.get_user_agent(self.driver, *args, **kwargs)
|
244
260
|
|
261
|
+
def get_cookie_string(self, *args, **kwargs):
|
262
|
+
if self.__is_cdp_swap_needed():
|
263
|
+
return self.driver.cdp.get_cookie_string()
|
264
|
+
return js_utils.get_cookie_string(self.driver, *args, **kwargs)
|
265
|
+
|
245
266
|
def highlight(self, *args, **kwargs):
|
246
267
|
if self.__is_cdp_swap_needed():
|
247
268
|
selector = None
|
@@ -312,6 +333,16 @@ class DriverMethods():
|
|
312
333
|
iframe = self.locator(frame)
|
313
334
|
self.driver.switch_to.frame(iframe)
|
314
335
|
|
336
|
+
def reset_window_size(self):
|
337
|
+
if self.__is_cdp_swap_needed():
|
338
|
+
self.driver.cdp.reset_window_size()
|
339
|
+
return
|
340
|
+
x = settings.WINDOW_START_X
|
341
|
+
y = settings.WINDOW_START_Y
|
342
|
+
width = settings.CHROME_START_WIDTH
|
343
|
+
height = settings.CHROME_START_HEIGHT
|
344
|
+
self.driver.set_window_rect(x, y, width, height)
|
345
|
+
|
315
346
|
def set_wire_proxy(self, string):
|
316
347
|
"""Set a proxy server for selenium-wire mode ("--wire")
|
317
348
|
Examples: (ONLY avilable if using selenium-wire mode!)
|
@@ -3452,6 +3452,13 @@ class BaseCase(unittest.TestCase):
|
|
3452
3452
|
y = element_rect["y"] + (element_rect["height"] / 2.0) + 0.5
|
3453
3453
|
return (x, y)
|
3454
3454
|
|
3455
|
+
def get_screen_rect(self):
|
3456
|
+
self.__check_scope()
|
3457
|
+
if self.__is_cdp_swap_needed():
|
3458
|
+
return self.cdp.get_screen_rect()
|
3459
|
+
self._check_browser()
|
3460
|
+
return self.driver.get_screen_rect()
|
3461
|
+
|
3455
3462
|
def get_window_rect(self):
|
3456
3463
|
self.__check_scope()
|
3457
3464
|
if self.__is_cdp_swap_needed():
|
@@ -3475,6 +3482,9 @@ class BaseCase(unittest.TestCase):
|
|
3475
3482
|
|
3476
3483
|
def set_window_rect(self, x, y, width, height):
|
3477
3484
|
self.__check_scope()
|
3485
|
+
if self.__is_cdp_swap_needed():
|
3486
|
+
self.cdp.set_window_rect(x, y, width, height)
|
3487
|
+
return
|
3478
3488
|
self._check_browser()
|
3479
3489
|
self.driver.set_window_rect(x, y, width, height)
|
3480
3490
|
self.__demo_mode_pause_if_active(tiny=True)
|
@@ -3493,10 +3503,35 @@ class BaseCase(unittest.TestCase):
|
|
3493
3503
|
|
3494
3504
|
def maximize_window(self):
|
3495
3505
|
self.__check_scope()
|
3506
|
+
if self.__is_cdp_swap_needed():
|
3507
|
+
self.cdp.maximize()
|
3508
|
+
return
|
3496
3509
|
self._check_browser()
|
3497
3510
|
self.driver.maximize_window()
|
3498
3511
|
self.__demo_mode_pause_if_active(tiny=True)
|
3499
3512
|
|
3513
|
+
def minimize_window(self):
|
3514
|
+
self.__check_scope()
|
3515
|
+
if self.__is_cdp_swap_needed():
|
3516
|
+
self.cdp.minimize()
|
3517
|
+
return
|
3518
|
+
self._check_browser()
|
3519
|
+
self.driver.minimize_window()
|
3520
|
+
self.__demo_mode_pause_if_active(tiny=True)
|
3521
|
+
|
3522
|
+
def reset_window_size(self):
|
3523
|
+
self.__check_scope()
|
3524
|
+
if self.__is_cdp_swap_needed():
|
3525
|
+
self.cdp.reset_window_size()
|
3526
|
+
return
|
3527
|
+
self._check_browser()
|
3528
|
+
x = settings.WINDOW_START_X
|
3529
|
+
y = settings.WINDOW_START_Y
|
3530
|
+
width = settings.CHROME_START_WIDTH
|
3531
|
+
height = settings.CHROME_START_HEIGHT
|
3532
|
+
self.set_window_rect(x, y, width, height)
|
3533
|
+
self.__demo_mode_pause_if_active(tiny=True)
|
3534
|
+
|
3500
3535
|
def switch_to_frame(self, frame="iframe", timeout=None):
|
3501
3536
|
"""Wait for an iframe to appear, and switch to it. This should be
|
3502
3537
|
usable as a drop-in replacement for driver.switch_to.frame().
|
@@ -1188,6 +1188,10 @@ def get_locale_code(driver):
|
|
1188
1188
|
return driver.execute_script(script)
|
1189
1189
|
|
1190
1190
|
|
1191
|
+
def get_screen_rect(driver):
|
1192
|
+
return driver.execute_script("return window.screen;")
|
1193
|
+
|
1194
|
+
|
1191
1195
|
def get_origin(driver):
|
1192
1196
|
return driver.execute_script("return window.location.origin;")
|
1193
1197
|
|
@@ -1196,6 +1200,10 @@ def get_user_agent(driver):
|
|
1196
1200
|
return driver.execute_script("return navigator.userAgent;")
|
1197
1201
|
|
1198
1202
|
|
1203
|
+
def get_cookie_string(driver):
|
1204
|
+
return driver.execute_script("return document.cookie;")
|
1205
|
+
|
1206
|
+
|
1199
1207
|
def get_scroll_distance_to_element(driver, element):
|
1200
1208
|
try:
|
1201
1209
|
scroll_position = driver.execute_script("return window.scrollY;")
|
@@ -275,12 +275,15 @@ def SB(
|
|
275
275
|
collect_only = ("--co" in sys_argv or "--collect-only" in sys_argv)
|
276
276
|
all_scripts = (hasattr(sb_config, "all_scripts") and sb_config.all_scripts)
|
277
277
|
do_log_folder_setup = False # The first "test=True" run does it
|
278
|
+
inner_test = False
|
278
279
|
if (
|
279
280
|
(hasattr(sb_config, "is_behave") and sb_config.is_behave)
|
280
281
|
or (hasattr(sb_config, "is_pytest") and sb_config.is_pytest)
|
281
282
|
or (hasattr(sb_config, "is_nosetest") and sb_config.is_nosetest)
|
282
283
|
):
|
283
284
|
existing_runner = True
|
285
|
+
if test:
|
286
|
+
inner_test = True
|
284
287
|
test = False # Already using a test runner. Skip extra test steps.
|
285
288
|
elif test is None and "--test" in sys_argv:
|
286
289
|
test = True
|
@@ -1222,7 +1225,10 @@ def SB(
|
|
1222
1225
|
sb._has_failure = True
|
1223
1226
|
exception = e
|
1224
1227
|
test_passed = False
|
1225
|
-
if not test_name:
|
1228
|
+
if (test or inner_test) and not test_name:
|
1229
|
+
print(e)
|
1230
|
+
return
|
1231
|
+
elif not test_name:
|
1226
1232
|
raise
|
1227
1233
|
else:
|
1228
1234
|
the_traceback = traceback.format_exc().strip()
|
@@ -6,8 +6,9 @@ import http.cookiejar
|
|
6
6
|
import json
|
7
7
|
import logging
|
8
8
|
import os
|
9
|
-
import pickle
|
10
9
|
import pathlib
|
10
|
+
import pickle
|
11
|
+
import re
|
11
12
|
import shutil
|
12
13
|
import urllib.parse
|
13
14
|
import urllib.request
|
@@ -644,7 +645,7 @@ class CookieJar:
|
|
644
645
|
"""
|
645
646
|
connection = None
|
646
647
|
for _tab in self._browser.tabs:
|
647
|
-
if _tab.closed:
|
648
|
+
if hasattr(_tab, "closed") and _tab.closed:
|
648
649
|
continue
|
649
650
|
connection = _tab
|
650
651
|
break
|
@@ -674,7 +675,7 @@ class CookieJar:
|
|
674
675
|
"""
|
675
676
|
connection = None
|
676
677
|
for _tab in self._browser.tabs:
|
677
|
-
if _tab.closed:
|
678
|
+
if hasattr(_tab, "closed") and _tab.closed:
|
678
679
|
continue
|
679
680
|
connection = _tab
|
680
681
|
break
|
@@ -698,13 +699,11 @@ class CookieJar:
|
|
698
699
|
- Contain "nowsecure"
|
699
700
|
:type pattern: str
|
700
701
|
"""
|
701
|
-
import re
|
702
|
-
|
703
702
|
pattern = re.compile(pattern)
|
704
703
|
save_path = pathlib.Path(file).resolve()
|
705
704
|
connection = None
|
706
705
|
for _tab in self._browser.tabs:
|
707
|
-
if _tab.closed:
|
706
|
+
if hasattr(_tab, "closed") and _tab.closed:
|
708
707
|
continue
|
709
708
|
connection = _tab
|
710
709
|
break
|
@@ -746,15 +745,13 @@ class CookieJar:
|
|
746
745
|
- Contain "nowsecure"
|
747
746
|
:type pattern: str
|
748
747
|
"""
|
749
|
-
import re
|
750
|
-
|
751
748
|
pattern = re.compile(pattern)
|
752
749
|
save_path = pathlib.Path(file).resolve()
|
753
750
|
cookies = pickle.load(save_path.open("r+b"))
|
754
751
|
included_cookies = []
|
755
752
|
connection = None
|
756
753
|
for _tab in self._browser.tabs:
|
757
|
-
if _tab.closed:
|
754
|
+
if hasattr(_tab, "closed") and _tab.closed:
|
758
755
|
continue
|
759
756
|
connection = _tab
|
760
757
|
break
|
@@ -779,7 +776,7 @@ class CookieJar:
|
|
779
776
|
"""
|
780
777
|
connection = None
|
781
778
|
for _tab in self._browser.tabs:
|
782
|
-
if _tab.closed:
|
779
|
+
if hasattr(_tab, "closed") and _tab.closed:
|
783
780
|
continue
|
784
781
|
connection = _tab
|
785
782
|
break
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.
|
3
|
+
Version: 4.33.1
|
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
|
@@ -61,10 +61,14 @@ Description-Content-Type: text/markdown
|
|
61
61
|
License-File: LICENSE
|
62
62
|
Requires-Dist: pip>=24.3.1
|
63
63
|
Requires-Dist: packaging>=24.2
|
64
|
-
Requires-Dist:
|
64
|
+
Requires-Dist: setuptools~=70.2; python_version < "3.10"
|
65
|
+
Requires-Dist: setuptools>=75.6.0; python_version >= "3.10"
|
66
|
+
Requires-Dist: wheel>=0.45.1
|
65
67
|
Requires-Dist: attrs>=24.2.0
|
66
68
|
Requires-Dist: certifi>=2024.8.30
|
67
69
|
Requires-Dist: exceptiongroup>=1.2.2
|
70
|
+
Requires-Dist: websockets~=13.1; python_version < "3.9"
|
71
|
+
Requires-Dist: websockets>=14.1; python_version >= "3.9"
|
68
72
|
Requires-Dist: filelock>=3.16.1
|
69
73
|
Requires-Dist: fasteners>=0.19
|
70
74
|
Requires-Dist: mycdp>=1.1.0
|
@@ -78,11 +82,14 @@ Requires-Dist: parse-type>=0.6.4
|
|
78
82
|
Requires-Dist: colorama>=0.4.6
|
79
83
|
Requires-Dist: pyyaml>=6.0.2
|
80
84
|
Requires-Dist: pygments>=2.18.0
|
85
|
+
Requires-Dist: pyreadline3>=3.5.3; platform_system == "Windows"
|
81
86
|
Requires-Dist: tabcompleter>=1.4.0
|
82
87
|
Requires-Dist: pdbp>=1.6.1
|
83
88
|
Requires-Dist: idna==3.10
|
84
89
|
Requires-Dist: chardet==5.2.0
|
85
90
|
Requires-Dist: charset-normalizer==3.4.0
|
91
|
+
Requires-Dist: urllib3<2,>=1.26.20; python_version < "3.10"
|
92
|
+
Requires-Dist: urllib3<2.3.0,>=1.26.20; python_version >= "3.10"
|
86
93
|
Requires-Dist: requests==2.32.3
|
87
94
|
Requires-Dist: sniffio==1.3.1
|
88
95
|
Requires-Dist: h11==0.14.0
|
@@ -91,7 +98,7 @@ Requires-Dist: trio==0.27.0
|
|
91
98
|
Requires-Dist: trio-websocket==0.11.1
|
92
99
|
Requires-Dist: wsproto==1.2.0
|
93
100
|
Requires-Dist: websocket-client==1.8.0
|
94
|
-
Requires-Dist: selenium==4.
|
101
|
+
Requires-Dist: selenium==4.27.1
|
95
102
|
Requires-Dist: cssselect==1.2.0
|
96
103
|
Requires-Dist: sortedcontainers==2.4.0
|
97
104
|
Requires-Dist: execnet==2.1.1
|
@@ -102,40 +109,34 @@ Requires-Dist: pytest==8.3.3
|
|
102
109
|
Requires-Dist: pytest-html==2.0.1
|
103
110
|
Requires-Dist: pytest-metadata==3.1.1
|
104
111
|
Requires-Dist: pytest-ordering==0.6
|
105
|
-
Requires-Dist: pytest-rerunfailures==14.0
|
112
|
+
Requires-Dist: pytest-rerunfailures==14.0; python_version < "3.9"
|
113
|
+
Requires-Dist: pytest-rerunfailures==15.0; python_version >= "3.9"
|
106
114
|
Requires-Dist: pytest-xdist==3.6.1
|
107
115
|
Requires-Dist: parameterized==0.9.0
|
108
116
|
Requires-Dist: behave==1.2.6
|
109
117
|
Requires-Dist: soupsieve==2.6
|
110
118
|
Requires-Dist: beautifulsoup4==4.12.3
|
111
119
|
Requires-Dist: pyotp==2.9.0
|
120
|
+
Requires-Dist: python-xlib==0.33; platform_system == "Linux"
|
112
121
|
Requires-Dist: markdown-it-py==3.0.0
|
113
122
|
Requires-Dist: mdurl==0.1.2
|
114
123
|
Requires-Dist: rich==13.9.4
|
115
|
-
Requires-Dist: python-xlib==0.33; platform_system == "Linux"
|
116
|
-
Requires-Dist: pyreadline3>=3.5.3; platform_system == "Windows"
|
117
|
-
Requires-Dist: setuptools~=70.2; python_version < "3.10"
|
118
|
-
Requires-Dist: urllib3<2,>=1.26.20; python_version < "3.10"
|
119
|
-
Requires-Dist: websockets~=13.1; python_version < "3.9"
|
120
|
-
Requires-Dist: setuptools>=75.5.0; python_version >= "3.10"
|
121
|
-
Requires-Dist: urllib3<2.3.0,>=1.26.20; python_version >= "3.10"
|
122
|
-
Requires-Dist: websockets>=14.1; python_version >= "3.9"
|
123
124
|
Provides-Extra: allure
|
124
125
|
Requires-Dist: allure-pytest>=2.13.5; extra == "allure"
|
125
126
|
Requires-Dist: allure-python-commons>=2.13.5; extra == "allure"
|
126
127
|
Requires-Dist: allure-behave>=2.13.5; extra == "allure"
|
127
128
|
Provides-Extra: coverage
|
128
129
|
Requires-Dist: coverage>=7.6.1; python_version < "3.9" and extra == "coverage"
|
130
|
+
Requires-Dist: coverage>=7.6.8; python_version >= "3.9" and extra == "coverage"
|
129
131
|
Requires-Dist: pytest-cov>=5.0.0; python_version < "3.9" and extra == "coverage"
|
130
|
-
Requires-Dist: coverage>=7.6.7; python_version >= "3.9" and extra == "coverage"
|
131
132
|
Requires-Dist: pytest-cov>=6.0.0; python_version >= "3.9" and extra == "coverage"
|
132
133
|
Provides-Extra: flake8
|
133
|
-
Requires-Dist: mccabe==0.7.0; extra == "flake8"
|
134
134
|
Requires-Dist: flake8==5.0.4; python_version < "3.9" and extra == "flake8"
|
135
|
-
Requires-Dist: pyflakes==2.5.0; python_version < "3.9" and extra == "flake8"
|
136
|
-
Requires-Dist: pycodestyle==2.9.1; python_version < "3.9" and extra == "flake8"
|
137
135
|
Requires-Dist: flake8==7.1.1; python_version >= "3.9" and extra == "flake8"
|
136
|
+
Requires-Dist: mccabe==0.7.0; extra == "flake8"
|
137
|
+
Requires-Dist: pyflakes==2.5.0; python_version < "3.9" and extra == "flake8"
|
138
138
|
Requires-Dist: pyflakes==3.2.0; python_version >= "3.9" and extra == "flake8"
|
139
|
+
Requires-Dist: pycodestyle==2.9.1; python_version < "3.9" and extra == "flake8"
|
139
140
|
Requires-Dist: pycodestyle==2.12.1; python_version >= "3.9" and extra == "flake8"
|
140
141
|
Provides-Extra: ipdb
|
141
142
|
Requires-Dist: ipdb==0.13.13; extra == "ipdb"
|
@@ -144,10 +145,10 @@ Provides-Extra: mss
|
|
144
145
|
Requires-Dist: mss==9.0.2; extra == "mss"
|
145
146
|
Provides-Extra: pdfminer
|
146
147
|
Requires-Dist: pdfminer.six==20240706; extra == "pdfminer"
|
148
|
+
Requires-Dist: cryptography==39.0.2; python_version < "3.9" and extra == "pdfminer"
|
149
|
+
Requires-Dist: cryptography==44.0.0; python_version >= "3.9" and extra == "pdfminer"
|
147
150
|
Requires-Dist: cffi==1.17.1; extra == "pdfminer"
|
148
151
|
Requires-Dist: pycparser==2.22; extra == "pdfminer"
|
149
|
-
Requires-Dist: cryptography==39.0.2; python_version < "3.9" and extra == "pdfminer"
|
150
|
-
Requires-Dist: cryptography==43.0.3; python_version >= "3.9" and extra == "pdfminer"
|
151
152
|
Provides-Extra: pillow
|
152
153
|
Requires-Dist: Pillow>=10.4.0; python_version < "3.9" and extra == "pillow"
|
153
154
|
Requires-Dist: Pillow>=11.0.0; python_version >= "3.9" and extra == "pillow"
|
@@ -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=OtJh8nGKL4xtZpw8KPqmn7Q6R-86t4cWUDyVF5MbMTo,2398
|
5
5
|
seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
|
6
|
-
seleniumbase/__version__.py,sha256=
|
6
|
+
seleniumbase/__version__.py,sha256=WinMHufazbTH89-Ykuh9u7jq8VeYFiM_Km5byqgexBc,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=-hza7Nx2U41mSObYiPMi48v3JlPh3sJO3yzP0kqZ1Gk,59174
|
@@ -36,7 +36,7 @@ seleniumbase/console_scripts/sb_print.py,sha256=tNy-bMDgwHJO3bZxMpmo9weSE8uhbH0C
|
|
36
36
|
seleniumbase/console_scripts/sb_recorder.py,sha256=fnHb5-kh11Hit-E9Ha-e4QXzqLcZvtij6mb5qNd4B1Q,11032
|
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=TbUR5NkE4r34SFe5t_2R2uV8Br6NG8fihZOAZ2uZy3s,220834
|
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
|
@@ -50,8 +50,8 @@ seleniumbase/core/proxy_helper.py,sha256=cXhu8ErK9Vjdm82RMaQj7hEq_yUWizSp6LyiD50
|
|
50
50
|
seleniumbase/core/recorder_helper.py,sha256=fNGjbapXmEsht54x1o6Igk198QdnPxDDnjUOzQxNhNQ,25055
|
51
51
|
seleniumbase/core/report_helper.py,sha256=AIl6Qava2yW1uSzbLpJBlPlYDz0KE-rVhogh8hsGWBo,12201
|
52
52
|
seleniumbase/core/s3_manager.py,sha256=bkeI8I4y19ebWuQG1oEZV5qJbotC6eN8vin31OCNWJk,3521
|
53
|
-
seleniumbase/core/sb_cdp.py,sha256=
|
54
|
-
seleniumbase/core/sb_driver.py,sha256=
|
53
|
+
seleniumbase/core/sb_cdp.py,sha256=tS1eVtNEaNy12lqWNREFptRm_ylOxqQIwICvGwojwuk,67182
|
54
|
+
seleniumbase/core/sb_driver.py,sha256=NGa4adi8OAi2WFtFkEguXg3JCd1p-JuZweIpGNifEfU,13488
|
55
55
|
seleniumbase/core/session_helper.py,sha256=s9zD3PVZEWVzG2h81cCUskbNWLfdjC_LwwQjKptHCak,558
|
56
56
|
seleniumbase/core/settings_parser.py,sha256=KokVXpCiGZhJ-D4Bo-hizPz5r-iefzWoiTANu9zNaq4,7504
|
57
57
|
seleniumbase/core/style_sheet.py,sha256=tPpJ1xl6Kuw425Z-3Y0OgVRLGXk_ciBDREZjXk_NuPE,11395
|
@@ -65,11 +65,11 @@ 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=_A6LC26exhIz_4o3XXCmn36JeVmC3gJLKSJQeUXLFRg,716755
|
69
69
|
seleniumbase/fixtures/constants.py,sha256=e1LppavlrAcI4XBJMq7u5j8SffaQ7SPQps1y0YvZYfY,13649
|
70
70
|
seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3O5hSnEKA,1954
|
71
71
|
seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
|
72
|
-
seleniumbase/fixtures/js_utils.py,sha256=
|
72
|
+
seleniumbase/fixtures/js_utils.py,sha256=uHJ7RdOzvSkhG81nnO_m9qFRVmfCUsYbkH463q_w8Bo,51121
|
73
73
|
seleniumbase/fixtures/page_actions.py,sha256=dbp63c-7asYZyd8aOu57Y3dxQQozp_VJsP5h74s1kBA,66552
|
74
74
|
seleniumbase/fixtures/page_utils.py,sha256=5m7iXpikLs80TJoRO6_gEfXE1AKeQgcH1aFbR8o1C9A,12034
|
75
75
|
seleniumbase/fixtures/shared_utils.py,sha256=WbPb15IvIWzRtMInKG8DUzJ26UZU-PixdOwTCjXQirU,7545
|
@@ -90,7 +90,7 @@ seleniumbase/plugins/driver_manager.py,sha256=s20s0pJYaNrG0WNwyIC04oUMRVFjtm6V_n
|
|
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
|
93
|
-
seleniumbase/plugins/sb_manager.py,sha256=
|
93
|
+
seleniumbase/plugins/sb_manager.py,sha256=qCf6RAkAfziLTGgiJvB3V416RxWoTbRLm9wc-KsB8g8,54419
|
94
94
|
seleniumbase/plugins/screen_shots.py,sha256=1hrXw-hzuZ1BR6Yh7AyWX2ABnvnP73-RCbwdz958gj4,1127
|
95
95
|
seleniumbase/plugins/selenium_plugin.py,sha256=GhGW2ATy2kM7UH7NrZ2je402nN2LMlVHpM-yxlU3I9E,59069
|
96
96
|
seleniumbase/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -115,7 +115,7 @@ seleniumbase/undetected/reactor.py,sha256=NropaXcO54pzmDq6quR27qPJxab6636H7LRAaq
|
|
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
|
118
|
-
seleniumbase/undetected/cdp_driver/browser.py,sha256=
|
118
|
+
seleniumbase/undetected/cdp_driver/browser.py,sha256=n8GYspU7b0pfBT4AqhqY6IdGVOZ1FC4wJ5emIOl-khQ,30129
|
119
119
|
seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=YhtD2Tm6PLIy9VKbgk8lHdGniS3mObyX4yAC1aG0TgQ,16733
|
120
120
|
seleniumbase/undetected/cdp_driver/config.py,sha256=Rjvde7V-XJ0ihZdTmOmHEVWSuDWm3SprQ3njg8SN3Go,12087
|
121
121
|
seleniumbase/undetected/cdp_driver/connection.py,sha256=sOTUGjbUqKA2hPvDcRCdqw1VQjVGJs7mbgVvzS7ldtE,23360
|
@@ -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.
|
139
|
-
seleniumbase-4.
|
140
|
-
seleniumbase-4.
|
141
|
-
seleniumbase-4.
|
142
|
-
seleniumbase-4.
|
143
|
-
seleniumbase-4.
|
138
|
+
seleniumbase-4.33.1.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
|
139
|
+
seleniumbase-4.33.1.dist-info/METADATA,sha256=Enu7xujlzc9XwoPVPstRzT_tCtGllzWM6NxKTLIkLbM,86554
|
140
|
+
seleniumbase-4.33.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
141
|
+
seleniumbase-4.33.1.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.33.1.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.33.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|