seleniumbase 4.38.2__py3-none-any.whl → 4.39.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/behave/behave_sb.py +3 -9
- seleniumbase/console_scripts/run.py +0 -30
- seleniumbase/console_scripts/sb_behave_gui.py +0 -7
- seleniumbase/console_scripts/sb_caseplans.py +0 -7
- seleniumbase/console_scripts/sb_commander.py +0 -7
- seleniumbase/console_scripts/sb_recorder.py +0 -6
- seleniumbase/core/browser_launcher.py +13 -7
- seleniumbase/core/mysql.py +2 -2
- seleniumbase/core/style_sheet.py +2 -9
- seleniumbase/core/visual_helper.py +2 -8
- seleniumbase/fixtures/base_case.py +33 -12
- seleniumbase/undetected/cdp_driver/browser.py +3 -0
- seleniumbase/undetected/cdp_driver/tab.py +4 -0
- {seleniumbase-4.38.2.dist-info → seleniumbase-4.39.0.dist-info}/METADATA +8 -6
- {seleniumbase-4.38.2.dist-info → seleniumbase-4.39.0.dist-info}/RECORD +20 -20
- {seleniumbase-4.38.2.dist-info → seleniumbase-4.39.0.dist-info}/WHEEL +1 -1
- {seleniumbase-4.38.2.dist-info → seleniumbase-4.39.0.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.38.2.dist-info → seleniumbase-4.39.0.dist-info}/licenses/LICENSE +0 -0
- {seleniumbase-4.38.2.dist-info → seleniumbase-4.39.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.39.0"
|
seleniumbase/behave/behave_sb.py
CHANGED
@@ -1280,15 +1280,9 @@ def _perform_behave_unconfigure_():
|
|
1280
1280
|
)
|
1281
1281
|
find_it_3 = '<td class="col-result">Untested</td>'
|
1282
1282
|
swap_with_3 = '<td class="col-result">Unreported</td>'
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
DASH_PIE_PNG_2 = constants.Dashboard.get_dash_pie_2()
|
1287
|
-
else:
|
1288
|
-
from seleniumbase.core import encoded_images
|
1289
|
-
|
1290
|
-
DASH_PIE_PNG_1 = encoded_images.get_dash_pie_png1()
|
1291
|
-
DASH_PIE_PNG_2 = encoded_images.get_dash_pie_png2()
|
1283
|
+
# These use caching to prevent extra method calls
|
1284
|
+
DASH_PIE_PNG_1 = constants.Dashboard.get_dash_pie_1()
|
1285
|
+
DASH_PIE_PNG_2 = constants.Dashboard.get_dash_pie_2()
|
1292
1286
|
find_it_4 = 'href="%s"' % DASH_PIE_PNG_1
|
1293
1287
|
swap_with_4 = 'href="%s"' % DASH_PIE_PNG_2
|
1294
1288
|
try:
|
@@ -1001,7 +1001,6 @@ def main():
|
|
1001
1001
|
retry_msg_2 = "** Unable to download driver! Retrying in 5s..."
|
1002
1002
|
if " --proxy=" in " ".join(sys.argv):
|
1003
1003
|
from seleniumbase.core import proxy_helper
|
1004
|
-
|
1005
1004
|
for arg in sys.argv:
|
1006
1005
|
if arg.startswith("--proxy="):
|
1007
1006
|
proxy_string = arg.split("--proxy=")[1]
|
@@ -1036,11 +1035,9 @@ def main():
|
|
1036
1035
|
show_install_usage()
|
1037
1036
|
elif command == "commander" or command == "gui":
|
1038
1037
|
from seleniumbase.console_scripts import sb_commander
|
1039
|
-
|
1040
1038
|
sb_commander.main()
|
1041
1039
|
elif command == "behave-gui" or command == "gui-behave":
|
1042
1040
|
from seleniumbase.console_scripts import sb_behave_gui
|
1043
|
-
|
1044
1041
|
sb_behave_gui.main()
|
1045
1042
|
elif (
|
1046
1043
|
command == "caseplans"
|
@@ -1048,14 +1045,12 @@ def main():
|
|
1048
1045
|
or command == "case_plans"
|
1049
1046
|
):
|
1050
1047
|
from seleniumbase.console_scripts import sb_caseplans
|
1051
|
-
|
1052
1048
|
sb_caseplans.main()
|
1053
1049
|
elif (
|
1054
1050
|
command == "recorder"
|
1055
1051
|
or (command == "record" and len(command_args) == 0)
|
1056
1052
|
):
|
1057
1053
|
from seleniumbase.console_scripts import sb_recorder
|
1058
|
-
|
1059
1054
|
sb_recorder.main()
|
1060
1055
|
elif (
|
1061
1056
|
command == "mkrec"
|
@@ -1064,7 +1059,6 @@ def main():
|
|
1064
1059
|
):
|
1065
1060
|
if len(command_args) >= 1:
|
1066
1061
|
from seleniumbase.console_scripts import sb_mkrec
|
1067
|
-
|
1068
1062
|
sb_mkrec.main()
|
1069
1063
|
else:
|
1070
1064
|
show_basic_usage()
|
@@ -1075,7 +1069,6 @@ def main():
|
|
1075
1069
|
elif command == "mkdir":
|
1076
1070
|
if len(command_args) >= 1:
|
1077
1071
|
from seleniumbase.console_scripts import sb_mkdir
|
1078
|
-
|
1079
1072
|
sb_mkdir.main()
|
1080
1073
|
else:
|
1081
1074
|
show_basic_usage()
|
@@ -1083,7 +1076,6 @@ def main():
|
|
1083
1076
|
elif command == "mkfile":
|
1084
1077
|
if len(command_args) >= 1:
|
1085
1078
|
from seleniumbase.console_scripts import sb_mkfile
|
1086
|
-
|
1087
1079
|
sb_mkfile.main()
|
1088
1080
|
else:
|
1089
1081
|
show_basic_usage()
|
@@ -1091,7 +1083,6 @@ def main():
|
|
1091
1083
|
elif command == "mkpres":
|
1092
1084
|
if len(command_args) >= 1:
|
1093
1085
|
from seleniumbase.console_scripts import sb_mkpres
|
1094
|
-
|
1095
1086
|
sb_mkpres.main()
|
1096
1087
|
else:
|
1097
1088
|
show_basic_usage()
|
@@ -1099,7 +1090,6 @@ def main():
|
|
1099
1090
|
elif command == "mkchart":
|
1100
1091
|
if len(command_args) >= 1:
|
1101
1092
|
from seleniumbase.console_scripts import sb_mkchart
|
1102
|
-
|
1103
1093
|
sb_mkchart.main()
|
1104
1094
|
else:
|
1105
1095
|
show_basic_usage()
|
@@ -1107,7 +1097,6 @@ def main():
|
|
1107
1097
|
elif command == "convert":
|
1108
1098
|
if len(command_args) == 1:
|
1109
1099
|
from seleniumbase.utilities.selenium_ide import convert_ide
|
1110
|
-
|
1111
1100
|
convert_ide.main()
|
1112
1101
|
else:
|
1113
1102
|
show_basic_usage()
|
@@ -1115,22 +1104,13 @@ def main():
|
|
1115
1104
|
elif command == "print":
|
1116
1105
|
if len(command_args) >= 1:
|
1117
1106
|
from seleniumbase.console_scripts import sb_print
|
1118
|
-
|
1119
1107
|
sb_print.main()
|
1120
1108
|
else:
|
1121
1109
|
show_basic_usage()
|
1122
1110
|
show_print_usage()
|
1123
1111
|
elif command == "translate":
|
1124
1112
|
if len(command_args) >= 1:
|
1125
|
-
if sys.version_info[0] == 2:
|
1126
|
-
c5 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
|
1127
|
-
cr = colorama.Style.RESET_ALL
|
1128
|
-
msg = "The SeleniumBase Translator does NOT support Python 2!"
|
1129
|
-
message = "\n" + c5 + msg + cr + "\n"
|
1130
|
-
print("")
|
1131
|
-
raise Exception(message)
|
1132
1113
|
from seleniumbase.translate import translator
|
1133
|
-
|
1134
1114
|
translator.main()
|
1135
1115
|
else:
|
1136
1116
|
show_basic_usage()
|
@@ -1138,7 +1118,6 @@ def main():
|
|
1138
1118
|
elif command == "extract-objects" or command == "extract_objects":
|
1139
1119
|
if len(command_args) >= 1:
|
1140
1120
|
from seleniumbase.console_scripts import sb_objectify
|
1141
|
-
|
1142
1121
|
sb_objectify.extract_objects()
|
1143
1122
|
else:
|
1144
1123
|
show_basic_usage()
|
@@ -1154,7 +1133,6 @@ def main():
|
|
1154
1133
|
elif command == "objectify":
|
1155
1134
|
if len(command_args) >= 1:
|
1156
1135
|
from seleniumbase.console_scripts import sb_objectify
|
1157
|
-
|
1158
1136
|
sb_objectify.objectify()
|
1159
1137
|
else:
|
1160
1138
|
show_basic_usage()
|
@@ -1162,7 +1140,6 @@ def main():
|
|
1162
1140
|
elif command == "revert-objects" or command == "revert_objects":
|
1163
1141
|
if len(command_args) >= 1:
|
1164
1142
|
from seleniumbase.console_scripts import sb_objectify
|
1165
|
-
|
1166
1143
|
sb_objectify.revert_objects()
|
1167
1144
|
else:
|
1168
1145
|
show_basic_usage()
|
@@ -1170,7 +1147,6 @@ def main():
|
|
1170
1147
|
elif command == "encrypt" or command == "obfuscate":
|
1171
1148
|
if len(command_args) >= 0:
|
1172
1149
|
from seleniumbase.common import obfuscate
|
1173
|
-
|
1174
1150
|
obfuscate.main()
|
1175
1151
|
else:
|
1176
1152
|
show_basic_usage()
|
@@ -1178,7 +1154,6 @@ def main():
|
|
1178
1154
|
elif command == "decrypt" or command == "unobfuscate":
|
1179
1155
|
if len(command_args) >= 0:
|
1180
1156
|
from seleniumbase.common import unobfuscate
|
1181
|
-
|
1182
1157
|
unobfuscate.main()
|
1183
1158
|
else:
|
1184
1159
|
show_basic_usage()
|
@@ -1188,7 +1163,6 @@ def main():
|
|
1188
1163
|
from seleniumbase.utilities.selenium_grid import (
|
1189
1164
|
download_selenium_server,
|
1190
1165
|
)
|
1191
|
-
|
1192
1166
|
download_selenium_server.main(force_download=True)
|
1193
1167
|
else:
|
1194
1168
|
show_basic_usage()
|
@@ -1196,7 +1170,6 @@ def main():
|
|
1196
1170
|
elif command == "grid-hub" or command == "grid_hub":
|
1197
1171
|
if len(command_args) >= 1:
|
1198
1172
|
from seleniumbase.utilities.selenium_grid import grid_hub
|
1199
|
-
|
1200
1173
|
grid_hub.main()
|
1201
1174
|
else:
|
1202
1175
|
show_basic_usage()
|
@@ -1204,7 +1177,6 @@ def main():
|
|
1204
1177
|
elif command == "grid-node" or command == "grid_node":
|
1205
1178
|
if len(command_args) >= 1:
|
1206
1179
|
from seleniumbase.utilities.selenium_grid import grid_node
|
1207
|
-
|
1208
1180
|
grid_node.main()
|
1209
1181
|
else:
|
1210
1182
|
show_basic_usage()
|
@@ -1212,7 +1184,6 @@ def main():
|
|
1212
1184
|
elif command == "version" or command == "--version" or command == "-v":
|
1213
1185
|
if len(command_args) == 0:
|
1214
1186
|
from seleniumbase.console_scripts import logo_helper
|
1215
|
-
|
1216
1187
|
seleniumbase_logo = logo_helper.get_seleniumbase_logo()
|
1217
1188
|
print(seleniumbase_logo)
|
1218
1189
|
print("")
|
@@ -1231,7 +1202,6 @@ def main():
|
|
1231
1202
|
import fasteners
|
1232
1203
|
import os
|
1233
1204
|
import warnings
|
1234
|
-
|
1235
1205
|
with warnings.catch_warnings():
|
1236
1206
|
warnings.simplefilter("ignore", category=UserWarning)
|
1237
1207
|
pip_find_lock = fasteners.InterProcessLock(
|
@@ -20,13 +20,6 @@ import tkinter as tk
|
|
20
20
|
from seleniumbase.fixtures import shared_utils
|
21
21
|
from tkinter.scrolledtext import ScrolledText
|
22
22
|
|
23
|
-
if sys.version_info <= (3, 8):
|
24
|
-
current_version = ".".join(str(ver) for ver in sys.version_info[:3])
|
25
|
-
raise Exception(
|
26
|
-
"\n* SBase Commander requires Python 3.8 or newer!"
|
27
|
-
"\n** You are currently using Python %s" % current_version
|
28
|
-
)
|
29
|
-
|
30
23
|
|
31
24
|
def set_colors(use_colors):
|
32
25
|
c0 = ""
|
@@ -25,13 +25,6 @@ from seleniumbase.fixtures import shared_utils
|
|
25
25
|
from tkinter import messagebox
|
26
26
|
from tkinter.scrolledtext import ScrolledText
|
27
27
|
|
28
|
-
if sys.version_info <= (3, 8):
|
29
|
-
current_version = ".".join(str(ver) for ver in sys.version_info[:3])
|
30
|
-
raise Exception(
|
31
|
-
"\n* SBase Case Plans Generator requires Python 3.8 or newer!"
|
32
|
-
"\n** You are currently using Python %s" % current_version
|
33
|
-
)
|
34
|
-
|
35
28
|
|
36
29
|
def set_colors(use_colors):
|
37
30
|
c0 = ""
|
@@ -25,13 +25,6 @@ import tkinter as tk
|
|
25
25
|
from seleniumbase.fixtures import shared_utils
|
26
26
|
from tkinter.scrolledtext import ScrolledText
|
27
27
|
|
28
|
-
if sys.version_info <= (3, 8):
|
29
|
-
current_version = ".".join(str(ver) for ver in sys.version_info[:3])
|
30
|
-
raise Exception(
|
31
|
-
"\n* SBase Commander requires Python 3.8 or newer!"
|
32
|
-
"\n** You are currently using Python %s" % current_version
|
33
|
-
)
|
34
|
-
|
35
28
|
|
36
29
|
def set_colors(use_colors):
|
37
30
|
c0 = ""
|
@@ -30,12 +30,6 @@ sb_config.rec_subprocess_used = False
|
|
30
30
|
sys_executable = sys.executable
|
31
31
|
if " " in sys_executable:
|
32
32
|
sys_executable = "python"
|
33
|
-
if sys.version_info <= (3, 8):
|
34
|
-
current_version = ".".join(str(ver) for ver in sys.version_info[:3])
|
35
|
-
raise Exception(
|
36
|
-
"\n* Recorder Desktop requires Python 3.8 or newer!"
|
37
|
-
"\n*** You are currently using Python %s" % current_version
|
38
|
-
)
|
39
33
|
|
40
34
|
|
41
35
|
def set_colors(use_colors):
|
@@ -404,7 +404,7 @@ def uc_special_open_if_cf(
|
|
404
404
|
special = True
|
405
405
|
if status_str == "403" or status_str == "429":
|
406
406
|
time.sleep(0.06) # Forbidden / Blocked! (Wait first!)
|
407
|
-
if special:
|
407
|
+
if special and not hasattr(driver, "cdp_base"):
|
408
408
|
time.sleep(0.05)
|
409
409
|
with driver:
|
410
410
|
driver.execute_script('window.open("%s","_blank");' % url)
|
@@ -472,9 +472,12 @@ def uc_open_with_tab(driver, url):
|
|
472
472
|
time.sleep(0.3)
|
473
473
|
return
|
474
474
|
if (url.startswith("http:") or url.startswith("https:")):
|
475
|
-
|
476
|
-
driver
|
477
|
-
|
475
|
+
if not hasattr(driver, "cdp_base"):
|
476
|
+
with driver:
|
477
|
+
driver.execute_script('window.open("%s","_blank");' % url)
|
478
|
+
driver.close()
|
479
|
+
else:
|
480
|
+
driver.cdp.open(url)
|
478
481
|
page_actions.switch_to_window(driver, driver.window_handles[-1], 2)
|
479
482
|
else:
|
480
483
|
driver.default_get(url) # The original one
|
@@ -492,9 +495,12 @@ def uc_open_with_reconnect(driver, url, reconnect_time=None):
|
|
492
495
|
reconnect_time = constants.UC.RECONNECT_TIME
|
493
496
|
if (url.startswith("http:") or url.startswith("https:")):
|
494
497
|
script = 'window.open("%s","_blank");' % url
|
495
|
-
driver
|
496
|
-
|
497
|
-
|
498
|
+
if not hasattr(driver, "cdp_base"):
|
499
|
+
driver.execute_script(script)
|
500
|
+
time.sleep(0.05)
|
501
|
+
driver.close()
|
502
|
+
else:
|
503
|
+
driver.cdp.open(url)
|
498
504
|
if reconnect_time == "disconnect":
|
499
505
|
driver.disconnect()
|
500
506
|
time.sleep(0.008)
|
seleniumbase/core/mysql.py
CHANGED
@@ -19,8 +19,8 @@ class DatabaseManager:
|
|
19
19
|
constants.PipInstall.FINDLOCK
|
20
20
|
)
|
21
21
|
with pip_find_lock:
|
22
|
-
if sys.version_info
|
23
|
-
# Fix bug
|
22
|
+
if sys.version_info < (3, 9):
|
23
|
+
# Fix bug with newer cryptography on Python 3.8:
|
24
24
|
# "pyo3_runtime.PanicException: Python API call failed"
|
25
25
|
# (Match the version needed for pdfminer.six functions)
|
26
26
|
try:
|
seleniumbase/core/style_sheet.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import sys
|
2
1
|
import textwrap
|
3
2
|
from seleniumbase.fixtures import constants
|
4
3
|
|
@@ -11,18 +10,12 @@ class Saved:
|
|
11
10
|
def get_report_style():
|
12
11
|
if hasattr(Saved, "report_style"):
|
13
12
|
return Saved.report_style
|
14
|
-
|
15
|
-
|
16
|
-
REPORT_FAVICON = constants.Report.get_favicon()
|
17
|
-
else:
|
18
|
-
from seleniumbase.core import encoded_images
|
19
|
-
|
20
|
-
REPORT_FAVICON = encoded_images.get_report_favicon()
|
13
|
+
# Uses caching to prevent extra method calls
|
14
|
+
REPORT_FAVICON = constants.Report.get_favicon()
|
21
15
|
title = """<meta id="OGTitle" property="og:title" content="SeleniumBase">
|
22
16
|
<title>Test Report</title>
|
23
17
|
<link rel="SHORTCUT ICON"
|
24
18
|
href="%s" />""" % REPORT_FAVICON
|
25
|
-
|
26
19
|
style = (
|
27
20
|
title
|
28
21
|
+ """<style type="text/css">
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import os
|
2
|
-
import sys
|
3
2
|
from seleniumbase.core import log_helper
|
4
3
|
from seleniumbase.fixtures import constants
|
5
4
|
|
@@ -22,13 +21,8 @@ def visual_baseline_folder_setup():
|
|
22
21
|
|
23
22
|
|
24
23
|
def get_sbs_head():
|
25
|
-
|
26
|
-
|
27
|
-
SIDE_BY_SIDE_PNG = constants.SideBySide.get_favicon()
|
28
|
-
else:
|
29
|
-
from seleniumbase.core import encoded_images
|
30
|
-
|
31
|
-
SIDE_BY_SIDE_PNG = encoded_images.get_side_by_side_png()
|
24
|
+
# Uses caching to prevent extra method calls
|
25
|
+
SIDE_BY_SIDE_PNG = constants.SideBySide.get_favicon()
|
32
26
|
head = (
|
33
27
|
'<head><meta charset="utf-8">'
|
34
28
|
'<meta name="viewport" content="shrink-to-fit=no">'
|
@@ -7678,10 +7678,13 @@ class BaseCase(unittest.TestCase):
|
|
7678
7678
|
break
|
7679
7679
|
time.sleep(1)
|
7680
7680
|
if not found and not os.path.exists(downloaded_file_path):
|
7681
|
+
plural = "s"
|
7682
|
+
if timeout == 1:
|
7683
|
+
plural = ""
|
7681
7684
|
message = (
|
7682
7685
|
"File {%s} was not found in the downloads folder {%s} "
|
7683
|
-
"after %s
|
7684
|
-
% (file, df, timeout)
|
7686
|
+
"after %s second%s! (Or the download didn't complete!)"
|
7687
|
+
% (file, df, timeout, plural)
|
7685
7688
|
)
|
7686
7689
|
page_actions.timeout_exception("NoSuchFileException", message)
|
7687
7690
|
if self.recorder_mode and self.__current_url_is_recordable():
|
@@ -7735,10 +7738,13 @@ class BaseCase(unittest.TestCase):
|
|
7735
7738
|
break
|
7736
7739
|
time.sleep(1)
|
7737
7740
|
if not found:
|
7741
|
+
plural = "s"
|
7742
|
+
if timeout == 1:
|
7743
|
+
plural = ""
|
7738
7744
|
message = (
|
7739
7745
|
"Regex {%s} was not found in the downloads folder {%s} "
|
7740
|
-
"after %s
|
7741
|
-
% (regex, df, timeout)
|
7746
|
+
"after %s second%s! (Or the download didn't complete!)"
|
7747
|
+
% (regex, df, timeout, plural)
|
7742
7748
|
)
|
7743
7749
|
page_actions.timeout_exception("NoSuchFileException", message)
|
7744
7750
|
if self.demo_mode:
|
@@ -8262,7 +8268,10 @@ class BaseCase(unittest.TestCase):
|
|
8262
8268
|
In CDP Mode, the CDP-Driver controls the web browser.
|
8263
8269
|
The CDP-Driver can be connected while WebDriver isn't.
|
8264
8270
|
"""
|
8265
|
-
|
8271
|
+
if hasattr(self.driver, "is_connected"):
|
8272
|
+
return self.driver.is_connected()
|
8273
|
+
else:
|
8274
|
+
return True
|
8266
8275
|
|
8267
8276
|
def is_chromium(self):
|
8268
8277
|
"""Return True if the browser is Chrome or Edge."""
|
@@ -10035,12 +10044,14 @@ class BaseCase(unittest.TestCase):
|
|
10035
10044
|
elif self.__is_cdp_swap_needed():
|
10036
10045
|
self.cdp.assert_text(text, selector, timeout=timeout)
|
10037
10046
|
return True
|
10038
|
-
elif not self.is_connected():
|
10039
|
-
self.connect()
|
10040
10047
|
elif self.__is_shadow_selector(selector):
|
10048
|
+
if hasattr(self, "connect") and not self.is_connected():
|
10049
|
+
self.connect()
|
10041
10050
|
self.__assert_shadow_text_visible(text, selector, timeout)
|
10042
10051
|
return True
|
10043
10052
|
else:
|
10053
|
+
if hasattr(self, "connect") and not self.is_connected():
|
10054
|
+
self.connect()
|
10044
10055
|
self.wait_for_text_visible(text, selector, by=by, timeout=timeout)
|
10045
10056
|
if self.demo_mode:
|
10046
10057
|
a_t = "ASSERT TEXT"
|
@@ -10174,9 +10185,13 @@ class BaseCase(unittest.TestCase):
|
|
10174
10185
|
if now_ms >= stop_ms:
|
10175
10186
|
break
|
10176
10187
|
time.sleep(0.2)
|
10177
|
-
|
10188
|
+
plural = "s"
|
10189
|
+
if timeout == 1:
|
10190
|
+
plural = ""
|
10191
|
+
message = "Link text {%s} was not found after %s second%s!" % (
|
10178
10192
|
link_text,
|
10179
10193
|
timeout,
|
10194
|
+
plural,
|
10180
10195
|
)
|
10181
10196
|
page_actions.timeout_exception("LinkTextNotFoundException", message)
|
10182
10197
|
|
@@ -10199,9 +10214,12 @@ class BaseCase(unittest.TestCase):
|
|
10199
10214
|
if now_ms >= stop_ms:
|
10200
10215
|
break
|
10201
10216
|
time.sleep(0.2)
|
10217
|
+
plural = "s"
|
10218
|
+
if timeout == 1:
|
10219
|
+
plural = ""
|
10202
10220
|
message = (
|
10203
|
-
"Partial Link text {%s} was not found after %s
|
10204
|
-
"" % (link_text, timeout)
|
10221
|
+
"Partial Link text {%s} was not found after %s second%s!"
|
10222
|
+
"" % (link_text, timeout, plural)
|
10205
10223
|
)
|
10206
10224
|
page_actions.timeout_exception("LinkTextNotFoundException", message)
|
10207
10225
|
|
@@ -14409,9 +14427,12 @@ class BaseCase(unittest.TestCase):
|
|
14409
14427
|
if must_be_visible and is_present:
|
14410
14428
|
error = "not visible"
|
14411
14429
|
the_exception = "ElementNotVisibleException"
|
14430
|
+
plural = "s"
|
14431
|
+
if timeout == 1:
|
14432
|
+
plural = ""
|
14412
14433
|
msg = (
|
14413
|
-
"Shadow DOM Element {%s} was %s after %s
|
14414
|
-
% (selector_chain, error, timeout)
|
14434
|
+
"Shadow DOM Element {%s} was %s after %s second%s!"
|
14435
|
+
% (selector_chain, error, timeout, plural)
|
14415
14436
|
)
|
14416
14437
|
page_actions.timeout_exception(the_exception, msg)
|
14417
14438
|
return element
|
@@ -493,6 +493,8 @@ class Tab(Connection):
|
|
493
493
|
search_id, nresult = await self.send(
|
494
494
|
cdp.dom.perform_search(text, True)
|
495
495
|
)
|
496
|
+
if not nresult:
|
497
|
+
return []
|
496
498
|
if nresult:
|
497
499
|
node_ids = await self.send(
|
498
500
|
cdp.dom.get_search_results(search_id, 0, nresult)
|
@@ -584,6 +586,8 @@ class Tab(Connection):
|
|
584
586
|
search_id, nresult = await self.send(
|
585
587
|
cdp.dom.perform_search(text, True)
|
586
588
|
)
|
589
|
+
if not nresult:
|
590
|
+
return
|
587
591
|
node_ids = await self.send(
|
588
592
|
cdp.dom.get_search_results(search_id, 0, nresult)
|
589
593
|
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.
|
3
|
+
Version: 4.39.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
|
@@ -63,7 +63,7 @@ Requires-Dist: pip>=25.0.1; python_version < "3.9"
|
|
63
63
|
Requires-Dist: pip>=25.1.1; python_version >= "3.9"
|
64
64
|
Requires-Dist: packaging>=25.0
|
65
65
|
Requires-Dist: setuptools~=70.2; python_version < "3.10"
|
66
|
-
Requires-Dist: setuptools>=80.
|
66
|
+
Requires-Dist: setuptools>=80.8.0; python_version >= "3.10"
|
67
67
|
Requires-Dist: wheel>=0.45.1
|
68
68
|
Requires-Dist: attrs>=25.3.0
|
69
69
|
Requires-Dist: certifi>=2025.4.26
|
@@ -106,13 +106,15 @@ Requires-Dist: trio-websocket==0.12.2
|
|
106
106
|
Requires-Dist: wsproto==1.2.0
|
107
107
|
Requires-Dist: websocket-client==1.8.0
|
108
108
|
Requires-Dist: selenium==4.27.1; python_version < "3.9"
|
109
|
-
Requires-Dist: selenium==4.32.0; python_version >= "3.9"
|
109
|
+
Requires-Dist: selenium==4.32.0; python_version >= "3.9" and python_version < "3.10"
|
110
|
+
Requires-Dist: selenium==4.33.0; python_version >= "3.10"
|
110
111
|
Requires-Dist: cssselect==1.2.0; python_version < "3.9"
|
111
112
|
Requires-Dist: cssselect==1.3.0; python_version >= "3.9"
|
112
113
|
Requires-Dist: sortedcontainers==2.4.0
|
113
114
|
Requires-Dist: execnet==2.1.1
|
114
115
|
Requires-Dist: iniconfig==2.1.0
|
115
|
-
Requires-Dist: pluggy==1.5.0
|
116
|
+
Requires-Dist: pluggy==1.5.0; python_version < "3.9"
|
117
|
+
Requires-Dist: pluggy==1.6.0; python_version >= "3.9"
|
116
118
|
Requires-Dist: pytest==8.3.5
|
117
119
|
Requires-Dist: pytest-html==4.0.2
|
118
120
|
Requires-Dist: pytest-metadata==3.1.1
|
@@ -135,7 +137,7 @@ Requires-Dist: allure-python-commons>=2.13.5; extra == "allure"
|
|
135
137
|
Requires-Dist: allure-behave>=2.13.5; extra == "allure"
|
136
138
|
Provides-Extra: coverage
|
137
139
|
Requires-Dist: coverage>=7.6.1; python_version < "3.9" and extra == "coverage"
|
138
|
-
Requires-Dist: coverage>=7.8.
|
140
|
+
Requires-Dist: coverage>=7.8.2; python_version >= "3.9" and extra == "coverage"
|
139
141
|
Requires-Dist: pytest-cov>=5.0.0; python_version < "3.9" and extra == "coverage"
|
140
142
|
Requires-Dist: pytest-cov>=6.1.1; python_version >= "3.9" and extra == "coverage"
|
141
143
|
Provides-Extra: flake8
|
@@ -156,7 +158,7 @@ Provides-Extra: pdfminer
|
|
156
158
|
Requires-Dist: pdfminer.six==20250324; python_version < "3.9" and extra == "pdfminer"
|
157
159
|
Requires-Dist: pdfminer.six==20250506; python_version >= "3.9" and extra == "pdfminer"
|
158
160
|
Requires-Dist: cryptography==39.0.2; python_version < "3.9" and extra == "pdfminer"
|
159
|
-
Requires-Dist: cryptography==
|
161
|
+
Requires-Dist: cryptography==45.0.2; python_version >= "3.9" and extra == "pdfminer"
|
160
162
|
Requires-Dist: cffi==1.17.1; extra == "pdfminer"
|
161
163
|
Requires-Dist: pycparser==2.22; extra == "pdfminer"
|
162
164
|
Provides-Extra: pillow
|
@@ -3,10 +3,10 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
|
|
3
3
|
sbase/steps.py,sha256=_WvAjydKqZfTdnZW9LPKkRty-g-lfdUPmLqnZj6ulcs,43013
|
4
4
|
seleniumbase/__init__.py,sha256=JFEY9P5QJqsa1M6ghzLMH2eIPQyh85iglCaQwg8Y8z4,2498
|
5
5
|
seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
|
6
|
-
seleniumbase/__version__.py,sha256=
|
6
|
+
seleniumbase/__version__.py,sha256=k8wTKBJCIX9jwhQ94xJBQTbrgOxlmuxwdJuKlB94tv4,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
|
-
seleniumbase/behave/behave_sb.py,sha256=
|
9
|
+
seleniumbase/behave/behave_sb.py,sha256=bbbfa8ID6nMnmrVJ7G-014uOj5PE4B8IROZB2WXSQ8I,59172
|
10
10
|
seleniumbase/behave/steps.py,sha256=8-N-NB2tnDsxaP4LSg-uSBgbwZYMS6ZEL1oggO1PCoU,390
|
11
11
|
seleniumbase/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
12
|
seleniumbase/common/decorators.py,sha256=DYdjtF8Y7YJj0JS33WtmsIn4yddPoniNwcPyrgt522o,7857
|
@@ -21,10 +21,10 @@ seleniumbase/config/settings.py,sha256=cAMmoFBQ6g8GCJIsRsSwGsP1_fJxhADxjHq30lFB1
|
|
21
21
|
seleniumbase/console_scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
seleniumbase/console_scripts/logo_helper.py,sha256=ZqS9TAwpcu5mM5ll-a0wTbXLs2Sbcsyo3EoC4jwtnME,2927
|
23
23
|
seleniumbase/console_scripts/rich_helper.py,sha256=U_zvXpalxVV8rtg8c8EnNNmnh45tii3AV5ZV3O3KbGA,2234
|
24
|
-
seleniumbase/console_scripts/run.py,sha256=
|
25
|
-
seleniumbase/console_scripts/sb_behave_gui.py,sha256=
|
26
|
-
seleniumbase/console_scripts/sb_caseplans.py,sha256=
|
27
|
-
seleniumbase/console_scripts/sb_commander.py,sha256=
|
24
|
+
seleniumbase/console_scripts/run.py,sha256=scHfo8Zf6F7ABAGBiKHF-Vv7MOrB6qU75RRiywjDYEg,58672
|
25
|
+
seleniumbase/console_scripts/sb_behave_gui.py,sha256=CX5dTIIptsaR1xLVy53DM6haV_mIc3kYALUkkhAkfRI,14888
|
26
|
+
seleniumbase/console_scripts/sb_caseplans.py,sha256=C_vhATSa9dEDOSmHT9uk64ebkXcqM5uu8Y1S3LjATkc,17875
|
27
|
+
seleniumbase/console_scripts/sb_commander.py,sha256=Ejal4WhnMSTLcykCT04jmMuH_fvDrfIAoxoJ23LclAM,13084
|
28
28
|
seleniumbase/console_scripts/sb_install.py,sha256=PUVOlajP43t0tf7fDLntYdOMGN4Ez7K5aDgXyyIZYYk,55662
|
29
29
|
seleniumbase/console_scripts/sb_mkchart.py,sha256=ep9g-9CSIwaOJKVxhB3xjRQpfsuApyN8-Dr129cNXwQ,10941
|
30
30
|
seleniumbase/console_scripts/sb_mkdir.py,sha256=iFN6ZMOgmH_GAvEuvzYltWuYiS3PRFQcL5fJIj1yX_Y,30897
|
@@ -33,10 +33,10 @@ seleniumbase/console_scripts/sb_mkpres.py,sha256=EWFRVacjYTX49y-fEiYTZacM9_01Ixu
|
|
33
33
|
seleniumbase/console_scripts/sb_mkrec.py,sha256=PrizjTmyrROYPO0yDm-zQS3QSfsZNeAmcJKKUvfgLhc,11966
|
34
34
|
seleniumbase/console_scripts/sb_objectify.py,sha256=nGxtVGL_nHj0bLHvk86znV3EABsE2_tjF74lgto1_Mk,122020
|
35
35
|
seleniumbase/console_scripts/sb_print.py,sha256=tNy-bMDgwHJO3bZxMpmo9weSE8uhbH0CUpP4VZqWxvI,30558
|
36
|
-
seleniumbase/console_scripts/sb_recorder.py,sha256=
|
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=8t9wHj7hiGrTC3SHlPi7AhTAX8y9XnV5Y6bgLWFkuVE,241559
|
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
|
@@ -45,7 +45,7 @@ seleniumbase/core/download_helper.py,sha256=qSR54kQISucF4RQaLCOuuerSu6DR41juGi_3
|
|
45
45
|
seleniumbase/core/encoded_images.py,sha256=rDKJ4cNJSuKiRcFViYU7bjyTS9_moI57gUPRXVg3u2k,14209
|
46
46
|
seleniumbase/core/jqc_helper.py,sha256=2DDQr9Q2jSSZqFzX588jLlUM9oJvyrRWq2aORSIPUdI,10322
|
47
47
|
seleniumbase/core/log_helper.py,sha256=SW8wx2f2HfU3ERbANjxEC-jDbjy_IzaNYRKPlayfRRI,23442
|
48
|
-
seleniumbase/core/mysql.py,sha256=
|
48
|
+
seleniumbase/core/mysql.py,sha256=X1McqBWCzN9DndyBbNrVg9_kvtaByVhodiXYkGbn36A,3955
|
49
49
|
seleniumbase/core/proxy_helper.py,sha256=pZ1NboNfziHU3vWZLOZLX-qkfM3oKSnpc3omQf9EUQQ,8809
|
50
50
|
seleniumbase/core/recorder_helper.py,sha256=fNGjbapXmEsht54x1o6Igk198QdnPxDDnjUOzQxNhNQ,25055
|
51
51
|
seleniumbase/core/report_helper.py,sha256=AIl6Qava2yW1uSzbLpJBlPlYDz0KE-rVhogh8hsGWBo,12201
|
@@ -54,10 +54,10 @@ seleniumbase/core/sb_cdp.py,sha256=zgkVXOhwf94NGdsUO0eM8yVUS3s5FzSuAPJNsz3lrZo,8
|
|
54
54
|
seleniumbase/core/sb_driver.py,sha256=yvTDRblBzG6bDX7XcLiAA6QcBelSJj_HHL_04lcfeeE,13760
|
55
55
|
seleniumbase/core/session_helper.py,sha256=s9zD3PVZEWVzG2h81cCUskbNWLfdjC_LwwQjKptHCak,558
|
56
56
|
seleniumbase/core/settings_parser.py,sha256=gqVohHVlE_5L5Cqe2L24uYrRzvoK-saX8E_Df7_-_3I,7609
|
57
|
-
seleniumbase/core/style_sheet.py,sha256=
|
57
|
+
seleniumbase/core/style_sheet.py,sha256=5qYN5GLk4gkwg7nqp3h0XH5YXRijANzKDuEdalzccuw,11714
|
58
58
|
seleniumbase/core/testcase_manager.py,sha256=TblCfo8Zfap1Bayip-qTu9gqT-KALSwXAX4awBpnEHg,4633
|
59
59
|
seleniumbase/core/tour_helper.py,sha256=kj2cz-DGKlw9SX3tWnVp-snpk6Flvqj81-xmKdKDtg0,42555
|
60
|
-
seleniumbase/core/visual_helper.py,sha256=
|
60
|
+
seleniumbase/core/visual_helper.py,sha256=HxPOulfEebc9ZSwe7E-nSQJ12N2l4vhqUQubLvE2QQw,3227
|
61
61
|
seleniumbase/drivers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
62
62
|
seleniumbase/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
63
63
|
seleniumbase/extensions/ad_block.zip,sha256=LTlaOYUs6a1Zu4op64pLoDEqYKJb8zHq_Y0PsBIIqCk,1454
|
@@ -65,7 +65,7 @@ seleniumbase/extensions/disable_csp.zip,sha256=5RvomXnm2PdivUVcxTV6jfvD8WhTEsQYH
|
|
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=zlF10aFjJdRUS6nT9ksvcXPdyD7A_mlFyAgEuQkVRj4,727097
|
69
69
|
seleniumbase/fixtures/constants.py,sha256=WMrItuNyKq3XVJ64NluLIRc4gJCxDw8K8qXED0b9S2w,13752
|
70
70
|
seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3O5hSnEKA,1954
|
71
71
|
seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
|
@@ -115,12 +115,12 @@ seleniumbase/undetected/reactor.py,sha256=NropaXcO54pzmDq6quR27qPJxab6636H7LRAaq
|
|
115
115
|
seleniumbase/undetected/webelement.py,sha256=OOpUYbEiOG52KsYYyuDW9tYLdA2SMnukvwQHUdPVn9E,1389
|
116
116
|
seleniumbase/undetected/cdp_driver/__init__.py,sha256=Ga9alwuaZZy4_XOShc0HjgFnNqpPdrcbjAicz5gE7a4,215
|
117
117
|
seleniumbase/undetected/cdp_driver/_contradict.py,sha256=lP4b0h5quAy573ETn_TBbYV889cL1AuPLVInpJ0ZkiU,3183
|
118
|
-
seleniumbase/undetected/cdp_driver/browser.py,sha256=
|
118
|
+
seleniumbase/undetected/cdp_driver/browser.py,sha256=v7SO8zVo4Ru8Rq5eJekMWwPO2h4kBGvb5he06_7Do_M,32858
|
119
119
|
seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=c4z2ltGeAKoLE8eyviJUxEM1GWK22qKPRDalVZcTuXQ,24357
|
120
120
|
seleniumbase/undetected/cdp_driver/config.py,sha256=t8KV1Vqa5SQRBq3-gjkHHmj9h85AplAM01asO3AWufs,12507
|
121
121
|
seleniumbase/undetected/cdp_driver/connection.py,sha256=d5G4MkCaDCv8ErtOCPB5hnr18kIZMuaGx8o0DKS0HNY,24559
|
122
122
|
seleniumbase/undetected/cdp_driver/element.py,sha256=FIC6v7OmumLCT-_vIc3H4oju_oBbaLpWJUJIKm2c_q4,40467
|
123
|
-
seleniumbase/undetected/cdp_driver/tab.py,sha256=
|
123
|
+
seleniumbase/undetected/cdp_driver/tab.py,sha256=t7Ucn0pmm7imwdCM-5KmIJNU2MCeMuIl6G3T2VMrbxU,53170
|
124
124
|
seleniumbase/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
125
125
|
seleniumbase/utilities/selenium_grid/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
126
126
|
seleniumbase/utilities/selenium_grid/download_selenium_server.py,sha256=ZdoInIbhtmdKCIPxxtJHhd2sqotqcNXWMYbwWrkh9O0,1727
|
@@ -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.39.0.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
|
139
|
+
seleniumbase-4.39.0.dist-info/METADATA,sha256=JmYu6Qeu_rgAHY1uJRPKcbsRswnSeSnrAaR-kXo-R_g,87122
|
140
|
+
seleniumbase-4.39.0.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
141
|
+
seleniumbase-4.39.0.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.39.0.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.39.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|