seleniumbase 4.31.6a3__py3-none-any.whl → 4.32.0__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/behave/behave_sb.py +0 -2
- seleniumbase/common/decorators.py +8 -7
- seleniumbase/console_scripts/logo_helper.py +0 -2
- seleniumbase/console_scripts/run.py +4 -38
- seleniumbase/console_scripts/sb_behave_gui.py +0 -1
- seleniumbase/console_scripts/sb_caseplans.py +0 -1
- seleniumbase/console_scripts/sb_commander.py +0 -1
- seleniumbase/console_scripts/sb_install.py +4 -5
- seleniumbase/console_scripts/sb_mkchart.py +0 -2
- seleniumbase/console_scripts/sb_mkdir.py +0 -2
- seleniumbase/console_scripts/sb_mkfile.py +0 -2
- seleniumbase/console_scripts/sb_mkpres.py +0 -2
- seleniumbase/console_scripts/sb_mkrec.py +0 -2
- seleniumbase/console_scripts/sb_print.py +0 -2
- seleniumbase/console_scripts/sb_recorder.py +0 -1
- seleniumbase/core/browser_launcher.py +252 -44
- seleniumbase/core/sb_cdp.py +898 -0
- seleniumbase/core/sb_driver.py +44 -0
- seleniumbase/fixtures/base_case.py +208 -11
- seleniumbase/fixtures/constants.py +1 -0
- seleniumbase/fixtures/js_utils.py +4 -0
- seleniumbase/fixtures/page_actions.py +106 -0
- seleniumbase/fixtures/shared_utils.py +26 -0
- seleniumbase/plugins/driver_manager.py +136 -47
- seleniumbase/plugins/pytest_plugin.py +0 -2
- seleniumbase/plugins/sb_manager.py +40 -2
- seleniumbase/translate/translator.py +0 -2
- seleniumbase/undetected/__init__.py +2 -0
- seleniumbase/undetected/patcher.py +5 -5
- {seleniumbase-4.31.6a3.dist-info → seleniumbase-4.32.0.dist-info}/METADATA +26 -20
- {seleniumbase-4.31.6a3.dist-info → seleniumbase-4.32.0.dist-info}/RECORD +36 -35
- {seleniumbase-4.31.6a3.dist-info → seleniumbase-4.32.0.dist-info}/WHEEL +1 -1
- {seleniumbase-4.31.6a3.dist-info → seleniumbase-4.32.0.dist-info}/LICENSE +0 -0
- {seleniumbase-4.31.6a3.dist-info → seleniumbase-4.32.0.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.31.6a3.dist-info → seleniumbase-4.32.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.32.0"
|
seleniumbase/behave/behave_sb.py
CHANGED
@@ -1231,7 +1231,6 @@ def behave_dashboard_prepare():
|
|
1231
1231
|
c1 = ""
|
1232
1232
|
cr = ""
|
1233
1233
|
if not is_linux:
|
1234
|
-
shared_utils.fix_colorama_if_windows()
|
1235
1234
|
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
|
1236
1235
|
cr = colorama.Style.RESET_ALL
|
1237
1236
|
print("Dashboard: %s%s%s\n%s" % (c1, dash_path, cr, stars))
|
@@ -1343,7 +1342,6 @@ def _perform_behave_terminal_summary_():
|
|
1343
1342
|
c2 = ""
|
1344
1343
|
cr = ""
|
1345
1344
|
if not is_linux:
|
1346
|
-
shared_utils.fix_colorama_if_windows()
|
1347
1345
|
c2 = colorama.Fore.MAGENTA + colorama.Back.LIGHTYELLOW_EX
|
1348
1346
|
cr = colorama.Style.RESET_ALL
|
1349
1347
|
if sb_config.dashboard:
|
@@ -43,23 +43,24 @@ def print_runtime(description=None, limit=None):
|
|
43
43
|
finally:
|
44
44
|
end_time = time.time()
|
45
45
|
run_time = end_time - start_time
|
46
|
+
name = description
|
46
47
|
# Print times with a statistically significant number of decimal places
|
47
48
|
if run_time < 0.0001:
|
48
|
-
print("
|
49
|
+
print("<info> - {%s} ran for %.7f seconds." % (name, run_time))
|
49
50
|
elif run_time < 0.001:
|
50
|
-
print("
|
51
|
+
print("<info> - {%s} ran for %.6f seconds." % (name, run_time))
|
51
52
|
elif run_time < 0.01:
|
52
|
-
print("
|
53
|
+
print("<info> - {%s} ran for %.5f seconds." % (name, run_time))
|
53
54
|
elif run_time < 0.1:
|
54
|
-
print("
|
55
|
+
print("<info> - {%s} ran for %.4f seconds." % (name, run_time))
|
55
56
|
elif run_time < 1:
|
56
|
-
print("
|
57
|
+
print("<info> - {%s} ran for %.3f seconds." % (name, run_time))
|
57
58
|
else:
|
58
|
-
print("
|
59
|
+
print("<info> - {%s} ran for %.2f seconds." % (name, run_time))
|
59
60
|
if limit and limit > 0 and run_time > limit:
|
60
61
|
message = (
|
61
62
|
"\n {%s} duration of %.2fs exceeded the time limit of %.2fs!"
|
62
|
-
% (
|
63
|
+
% (name, run_time, limit)
|
63
64
|
)
|
64
65
|
if exception:
|
65
66
|
message = exception.msg + "\nAND " + message
|
@@ -5,7 +5,6 @@
|
|
5
5
|
import colorama
|
6
6
|
import os
|
7
7
|
from contextlib import suppress
|
8
|
-
from seleniumbase.fixtures import shared_utils
|
9
8
|
|
10
9
|
r"""
|
11
10
|
______ __ _ ____
|
@@ -17,7 +16,6 @@ r"""
|
|
17
16
|
|
18
17
|
|
19
18
|
def get_seleniumbase_logo():
|
20
|
-
shared_utils.fix_colorama_if_windows()
|
21
19
|
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
|
22
20
|
c2 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX
|
23
21
|
c3 = colorama.Back.CYAN
|
@@ -46,8 +46,6 @@ from seleniumbase.config import settings
|
|
46
46
|
from seleniumbase.fixtures import constants
|
47
47
|
from seleniumbase.fixtures import shared_utils
|
48
48
|
|
49
|
-
shared_utils.fix_colorama_if_windows()
|
50
|
-
|
51
49
|
|
52
50
|
def show_basic_usage():
|
53
51
|
from seleniumbase.console_scripts import logo_helper
|
@@ -102,6 +100,7 @@ def show_basic_usage():
|
|
102
100
|
sc += '│ * For info on all commands => "sbase --help" │\n'
|
103
101
|
sc += "╰──────────────────────────────────────────────────╯"
|
104
102
|
sc += ""
|
103
|
+
bordered_sc = sc
|
105
104
|
if "linux" not in sys.platform:
|
106
105
|
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
|
107
106
|
c2 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX
|
@@ -116,42 +115,9 @@ def show_basic_usage():
|
|
116
115
|
with suppress(Exception):
|
117
116
|
print(sc)
|
118
117
|
return
|
119
|
-
sc = ""
|
120
|
-
sc
|
121
|
-
sc
|
122
|
-
sc += " \n"
|
123
|
-
sc += " COMMANDS: PARAMETERS / DESCRIPTIONS: \n"
|
124
|
-
sc += " get / install [DRIVER_NAME] [OPTIONS] \n"
|
125
|
-
sc += " methods (List common Python methods) \n"
|
126
|
-
sc += " options (List common pytest options) \n"
|
127
|
-
sc += " behave-options (List common behave options) \n"
|
128
|
-
sc += " gui / commander [OPTIONAL PATH or TEST FILE] \n"
|
129
|
-
sc += " behave-gui (SBase Commander for Behave) \n"
|
130
|
-
sc += " caseplans [OPTIONAL PATH or TEST FILE] \n"
|
131
|
-
sc += " mkdir [DIRECTORY] [OPTIONS] \n"
|
132
|
-
sc += " mkfile [FILE.py] [OPTIONS] \n"
|
133
|
-
sc += " mkrec / codegen [FILE.py] [OPTIONS] \n"
|
134
|
-
sc += " recorder (Open Recorder Desktop App.) \n"
|
135
|
-
sc += " record (If args: mkrec. Else: App.) \n"
|
136
|
-
sc += " mkpres [FILE.py] [LANG] \n"
|
137
|
-
sc += " mkchart [FILE.py] [LANG] \n"
|
138
|
-
sc += " print [FILE] [OPTIONS] \n"
|
139
|
-
sc += " translate [SB_FILE.py] [LANG] [ACTION] \n"
|
140
|
-
sc += " convert [WEBDRIVER_UNITTEST_FILE.py] \n"
|
141
|
-
sc += " extract-objects [SB_FILE.py] \n"
|
142
|
-
sc += " inject-objects [SB_FILE.py] [OPTIONS] \n"
|
143
|
-
sc += " objectify [SB_FILE.py] [OPTIONS] \n"
|
144
|
-
sc += " revert-objects [SB_FILE.py] [OPTIONS] \n"
|
145
|
-
sc += " encrypt / obfuscate \n"
|
146
|
-
sc += " decrypt / unobfuscate \n"
|
147
|
-
sc += " proxy (Start a basic proxy server) \n"
|
148
|
-
sc += " download server (Get Selenium Grid JAR file) \n"
|
149
|
-
sc += " grid-hub [start|stop] [OPTIONS] \n"
|
150
|
-
sc += " grid-node [start|stop] --hub=[HOST/IP] \n"
|
151
|
-
sc += " \n"
|
152
|
-
sc += ' * EXAMPLE => "sbase get chromedriver stable" \n'
|
153
|
-
sc += ' * For command info => "sbase help [COMMAND]" \n'
|
154
|
-
sc += ' * For info on all commands => "sbase --help" \n'
|
118
|
+
sc = bordered_sc.replace("╮\n", "")
|
119
|
+
sc = sc.replace("╭", "").replace("╮", "").replace("│", "")
|
120
|
+
sc = sc.replace("╰", "").replace("╯", "").replace("─", "")
|
155
121
|
if "linux" not in sys.platform:
|
156
122
|
sc = sc.replace("seleniumbase", c1 + "selenium" + c2 + "base" + cr)
|
157
123
|
sc = sc.replace("sbase", c1 + "s" + c2 + "base" + cr)
|
@@ -38,7 +38,6 @@ def set_colors(use_colors):
|
|
38
38
|
c6 = ""
|
39
39
|
cr = ""
|
40
40
|
if use_colors:
|
41
|
-
shared_utils.fix_colorama_if_windows()
|
42
41
|
c0 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
|
43
42
|
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX
|
44
43
|
c2 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
|
@@ -42,7 +42,6 @@ def set_colors(use_colors):
|
|
42
42
|
c5 = ""
|
43
43
|
cr = ""
|
44
44
|
if use_colors:
|
45
|
-
shared_utils.fix_colorama_if_windows()
|
46
45
|
c0 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
|
47
46
|
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX
|
48
47
|
c2 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
|
@@ -42,7 +42,6 @@ def set_colors(use_colors):
|
|
42
42
|
c5 = ""
|
43
43
|
cr = ""
|
44
44
|
if use_colors:
|
45
|
-
shared_utils.fix_colorama_if_windows()
|
46
45
|
c0 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
|
47
46
|
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX
|
48
47
|
c2 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
|
@@ -294,7 +294,6 @@ def main(override=None, intel_for_uc=None, force_uc=None):
|
|
294
294
|
use_version = ""
|
295
295
|
new_file = ""
|
296
296
|
f_name = ""
|
297
|
-
shared_utils.fix_colorama_if_windows()
|
298
297
|
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
|
299
298
|
c2 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX
|
300
299
|
c3 = colorama.Fore.BLUE + colorama.Back.LIGHTYELLOW_EX
|
@@ -812,7 +811,7 @@ def main(override=None, intel_for_uc=None, force_uc=None):
|
|
812
811
|
zip_ref.extractall(downloads_folder)
|
813
812
|
zip_ref.close()
|
814
813
|
os.remove(zip_file_path)
|
815
|
-
shutil.
|
814
|
+
shutil.copy3(driver_path, os.path.join(downloads_folder, filename))
|
816
815
|
log_d("%sUnzip Complete!%s\n" % (c2, cr))
|
817
816
|
to_remove = [
|
818
817
|
"%s/%s/ruby_example/Gemfile" % (downloads_folder, h_ie_fn),
|
@@ -954,7 +953,7 @@ def main(override=None, intel_for_uc=None, force_uc=None):
|
|
954
953
|
)
|
955
954
|
if copy_to_path and os.path.exists(LOCAL_PATH):
|
956
955
|
path_file = LOCAL_PATH + f_name
|
957
|
-
shutil.
|
956
|
+
shutil.copy2(new_file, path_file)
|
958
957
|
make_executable(path_file)
|
959
958
|
log_d("Also copied to: %s%s%s" % (c3, path_file, cr))
|
960
959
|
log_d("")
|
@@ -1043,7 +1042,7 @@ def main(override=None, intel_for_uc=None, force_uc=None):
|
|
1043
1042
|
)
|
1044
1043
|
if copy_to_path and os.path.exists(LOCAL_PATH):
|
1045
1044
|
path_file = LOCAL_PATH + f_name
|
1046
|
-
shutil.
|
1045
|
+
shutil.copy2(new_file, path_file)
|
1047
1046
|
make_executable(path_file)
|
1048
1047
|
log_d("Also copied to: %s%s%s" % (c3, path_file, cr))
|
1049
1048
|
log_d("")
|
@@ -1079,7 +1078,7 @@ def main(override=None, intel_for_uc=None, force_uc=None):
|
|
1079
1078
|
)
|
1080
1079
|
if copy_to_path and os.path.exists(LOCAL_PATH):
|
1081
1080
|
path_file = LOCAL_PATH + f_name
|
1082
|
-
shutil.
|
1081
|
+
shutil.copy2(new_file, path_file)
|
1083
1082
|
make_executable(path_file)
|
1084
1083
|
log_d("Also copied to: %s%s%s" % (c3, path_file, cr))
|
1085
1084
|
log_d("")
|
@@ -26,7 +26,6 @@ import codecs
|
|
26
26
|
import colorama
|
27
27
|
import os
|
28
28
|
import sys
|
29
|
-
from seleniumbase.fixtures import shared_utils
|
30
29
|
|
31
30
|
|
32
31
|
def invalid_run_command(msg=None):
|
@@ -63,7 +62,6 @@ def main():
|
|
63
62
|
c7 = ""
|
64
63
|
cr = ""
|
65
64
|
if "linux" not in sys.platform:
|
66
|
-
shared_utils.fix_colorama_if_windows()
|
67
65
|
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
|
68
66
|
c5 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
|
69
67
|
c7 = colorama.Fore.BLACK + colorama.Back.MAGENTA
|
@@ -22,7 +22,6 @@ import codecs
|
|
22
22
|
import colorama
|
23
23
|
import os
|
24
24
|
import sys
|
25
|
-
from seleniumbase.fixtures import shared_utils
|
26
25
|
|
27
26
|
|
28
27
|
def invalid_run_command(msg=None):
|
@@ -55,7 +54,6 @@ def main():
|
|
55
54
|
c7 = ""
|
56
55
|
cr = ""
|
57
56
|
if "linux" not in sys.platform:
|
58
|
-
shared_utils.fix_colorama_if_windows()
|
59
57
|
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
|
60
58
|
c5 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
|
61
59
|
c7 = colorama.Fore.BLACK + colorama.Back.MAGENTA
|
@@ -44,7 +44,6 @@ import codecs
|
|
44
44
|
import colorama
|
45
45
|
import os
|
46
46
|
import sys
|
47
|
-
from seleniumbase.fixtures import shared_utils
|
48
47
|
|
49
48
|
|
50
49
|
def invalid_run_command(msg=None):
|
@@ -97,7 +96,6 @@ def main():
|
|
97
96
|
c7 = ""
|
98
97
|
cr = ""
|
99
98
|
if "linux" not in sys.platform:
|
100
|
-
shared_utils.fix_colorama_if_windows()
|
101
99
|
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
|
102
100
|
c5 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
|
103
101
|
c7 = colorama.Fore.BLACK + colorama.Back.MAGENTA
|
@@ -26,7 +26,6 @@ import codecs
|
|
26
26
|
import colorama
|
27
27
|
import os
|
28
28
|
import sys
|
29
|
-
from seleniumbase.fixtures import shared_utils
|
30
29
|
|
31
30
|
|
32
31
|
def invalid_run_command(msg=None):
|
@@ -63,7 +62,6 @@ def main():
|
|
63
62
|
c7 = ""
|
64
63
|
cr = ""
|
65
64
|
if "linux" not in sys.platform:
|
66
|
-
shared_utils.fix_colorama_if_windows()
|
67
65
|
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
|
68
66
|
c5 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
|
69
67
|
c7 = colorama.Fore.BLACK + colorama.Back.MAGENTA
|
@@ -34,7 +34,6 @@ import colorama
|
|
34
34
|
import shutil
|
35
35
|
import os
|
36
36
|
import sys
|
37
|
-
from seleniumbase.fixtures import shared_utils
|
38
37
|
|
39
38
|
|
40
39
|
def invalid_run_command(msg=None):
|
@@ -72,7 +71,6 @@ def set_colors(use_colors):
|
|
72
71
|
c7 = ""
|
73
72
|
cr = ""
|
74
73
|
if use_colors:
|
75
|
-
shared_utils.fix_colorama_if_windows()
|
76
74
|
c0 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
|
77
75
|
c1 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
|
78
76
|
c2 = colorama.Fore.LIGHTRED_EX + colorama.Back.LIGHTYELLOW_EX
|
@@ -13,7 +13,6 @@ Output:
|
|
13
13
|
import colorama
|
14
14
|
import os
|
15
15
|
import sys
|
16
|
-
from seleniumbase.fixtures import shared_utils
|
17
16
|
|
18
17
|
|
19
18
|
def invalid_run_command(msg=None):
|
@@ -62,7 +61,6 @@ def get_width(line):
|
|
62
61
|
|
63
62
|
|
64
63
|
def main():
|
65
|
-
shared_utils.fix_colorama_if_windows()
|
66
64
|
c5 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
|
67
65
|
c7 = colorama.Fore.BLACK + colorama.Back.MAGENTA
|
68
66
|
cr = colorama.Style.RESET_ALL
|
@@ -45,7 +45,6 @@ def set_colors(use_colors):
|
|
45
45
|
c4 = ""
|
46
46
|
cr = ""
|
47
47
|
if use_colors:
|
48
|
-
shared_utils.fix_colorama_if_windows()
|
49
48
|
c0 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
|
50
49
|
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX
|
51
50
|
c2 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
|