Skip to content

Commit 4bb3a0a

Browse files
authored
Merge pull request #1565 from seleniumbase/all-kinds-of-updates-2
All kinds of updates
2 parents fe3d30e + 7dc47db commit 4bb3a0a

File tree

19 files changed

+185
-37
lines changed

19 files changed

+185
-37
lines changed

examples/raw_parameter_script.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
sb.dashboard = False
100100
sb._dash_initialized = False
101101
sb.message_duration = None
102+
sb.enable_3d_apis = False
102103
sb.block_images = False
103104
sb.do_not_track = False
104105
sb.external_pdf = False

help_docs/method_summary.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,8 @@ self.generate_traffic_chain(pages, loops=1)
663663
self.get_element(selector, by="css selector", timeout=None)
664664
# Duplicates: self.wait_for_element_present(selector, by="css selector", timeout=None)
665665

666+
self.wait_for_query_selector(selector, by="css selector", timeout=None)
667+
666668
self.assert_element_present(selector, by="css selector", timeout=None)
667669

668670
self.assert_elements_present(*args, **kwargs)

mkdocs_build/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ keyring==23.9.3
1212
pkginfo==1.8.3
1313
Jinja2==3.1.2
1414
click==8.1.3
15-
zipp==3.9.0
15+
zipp==3.10.0
1616
ghp-import==2.1.0
1717
readme-renderer==37.2
1818
pymdown-extensions==9.7
@@ -33,4 +33,4 @@ mkdocs-material==8.5.7
3333
mkdocs-exclude-search==0.6.4
3434
mkdocs-simple-hooks==0.1.5
3535
mkdocs-material-extensions==1.1
36-
mkdocs-minify-plugin==0.6.0
36+
mkdocs-minify-plugin==0.6.1

requirements.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ urllib3==1.26.12
4444
requests==2.27.1;python_version<"3.6"
4545
requests==2.27.1;python_version>="3.6" and python_version<"3.7"
4646
requests==2.28.1;python_version>="3.7"
47-
requests-toolbelt==0.10.0
47+
requests-toolbelt==0.10.1
4848
nose==1.3.7
4949
sniffio==1.3.0;python_version>="3.7"
5050
h11==0.14.0;python_version>="3.7"
@@ -107,7 +107,9 @@ ipython==5.10.0;python_version<"3.6"
107107
ipython==7.16.1;python_version>="3.6" and python_version<"3.7"
108108
ipython==7.34.0;python_version>="3.7"
109109
matplotlib-inline==0.1.6;python_version>="3.7"
110-
colorama==0.4.5
110+
colorama==0.4.6;python_version<"3.6"
111+
colorama==0.4.5;python_version>="3.6" and python_version<"3.7"
112+
colorama==0.4.6;python_version>="3.7"
111113
importlib-metadata==2.1.3;python_version<"3.6"
112114
importlib-metadata==4.2.0;python_version>="3.6" and python_version<"3.8"
113115
pycparser==2.21

seleniumbase/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "4.6.5"
2+
__version__ = "4.6.6"

seleniumbase/behave/behave_sb.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
-D remote-debug (Enable Chrome's Remote Debugger on http://localhost:9222)
7878
-D dashboard (Enable the SeleniumBase Dashboard. Saved at: dashboard.html)
7979
-D dash-title=STRING (Set the title shown for the generated dashboard.)
80+
-D enable-3d-apis (Enables WebGL and 3D APIs.)
8081
-D swiftshader (Use Chrome's "--use-gl=swiftshader" feature.)
8182
-D incognito (Enable Chrome's Incognito mode.)
8283
-D guest (Enable Chrome's Guest mode.)
@@ -214,6 +215,7 @@ def get_configured_sb(context):
214215
sb.proxy_string = None
215216
sb.proxy_bypass_list = None
216217
sb.proxy_pac_url = None
218+
sb.enable_3d_apis = False
217219
sb.swiftshader = False
218220
sb.ad_block_on = False
219221
sb.is_nosetest = False
@@ -708,6 +710,10 @@ def get_configured_sb(context):
708710
proxy_pac_url = sb.proxy_pac_url # revert to default
709711
sb.proxy_pac_url = proxy_pac_url
710712
continue
713+
# Handle: -D enable-3d-apis / enable_3d_apis
714+
if low_key in ["enable-3d-apis", "enable_3d_apis"]:
715+
sb.enable_3d_apis = True
716+
continue
711717
# Handle: -D swiftshader
712718
if low_key == "swiftshader":
713719
sb.swiftshader = True

seleniumbase/console_scripts/ReadMe.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ sbase codegen new_test.py --url=wikipedia.org
386386
``--url=URL`` (Sets the initial start page URL.)
387387
``--edge`` (Use Edge browser instead of Chrome.)
388388
``--gui`` / ``--headed`` (Use headed mode on Linux.)
389+
``--uc`` / ``--undetected`` (Use undetectable mode.)
389390
``--overwrite`` (Overwrite file when it exists.)
390391
``--behave`` (Also output Behave/Gherkin files.)
391392
@@ -404,6 +405,7 @@ sbase recorder [OPTIONS]
404405
405406
* Options:
406407
408+
``--uc`` / ``--undetected`` (Use undetectable mode.)
407409
``--behave`` (Also output Behave/Gherkin files.)
408410
409411
* Output:

seleniumbase/console_scripts/run.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ def show_mkrec_usage():
299299
print(" --url=URL (Sets the initial start page URL.)")
300300
print(" --edge (Use Edge browser instead of Chrome.)")
301301
print(" --gui / --headed (Use headed mode on Linux.)")
302+
print(" --uc / --undetected (Use undetectable mode.)")
302303
print(" --overwrite (Overwrite file when it exists.)")
303304
print(" --behave (Also output Behave/Gherkin files.)")
304305
print(" Output:")
@@ -324,6 +325,7 @@ def show_codegen_usage():
324325
print(" --url=URL (Sets the initial start page URL.)")
325326
print(" --edge (Use Edge browser instead of Chrome.)")
326327
print(" --gui / --headed (Use headed mode on Linux.)")
328+
print(" --uc / --undetected (Use undetectable mode.)")
327329
print(" --overwrite (Overwrite file when it exists.)")
328330
print(" --behave (Also output Behave/Gherkin files.)")
329331
print(" Output:")
@@ -343,6 +345,7 @@ def show_recorder_usage():
343345
print(" seleniumbase recorder [OPTIONS]")
344346
print(" OR: sbase recorder [OPTIONS]")
345347
print(" Options:")
348+
print(" --uc / --undetected (Use undetectable mode.)")
346349
print(" --behave (Also output Behave/Gherkin files.)")
347350
print(" Output:")
348351
print(" Launches the SeleniumBase Recorder Desktop App.")

seleniumbase/console_scripts/sb_mkrec.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
--url=URL (Sets the initial start page URL.)
2323
--edge (Use Edge browser instead of Chrome.)
2424
--gui / --headed (Use headed mode on Linux.)
25+
--uc / --undetected (Use undetectable mode.)
2526
--overwrite (Overwrite file when it exists.)
2627
--behave (Also output Behave/Gherkin files.)
2728
@@ -49,6 +50,7 @@ def invalid_run_command(msg=None):
4950
exp += " --url=URL (Sets the initial start page URL.)\n"
5051
exp += " --edge (Use Edge browser instead of Chrome.)\n"
5152
exp += " --gui / --headed (Use headed mode on Linux.)\n"
53+
exp += " --uc / --undetected (Use undetectable mode.)\n"
5254
exp += " --overwrite (Overwrite file when it exists.)\n"
5355
exp += " --behave (Also output Behave/Gherkin files.)\n"
5456
exp += " Output:\n"
@@ -87,6 +89,7 @@ def main():
8789
error_msg = None
8890
invalid_cmd = None
8991
use_edge = False
92+
use_uc = False
9093
start_page = None
9194
next_is_url = False
9295
use_colors = True
@@ -138,6 +141,8 @@ def main():
138141
elif option.lower() in ("--gui", "--headed"):
139142
if "linux" in platform:
140143
force_gui = True
144+
elif option.lower() in ("--uc", "--undetected", "--undetectable"):
145+
use_uc = True
141146
elif option.lower() in ("--rec-behave", "--behave", "--gherkin"):
142147
rec_behave = True
143148
elif option.lower().startswith("--url="):
@@ -186,6 +191,8 @@ def main():
186191
run_cmd += " --edge"
187192
if force_gui:
188193
run_cmd += " --gui"
194+
if use_uc:
195+
run_cmd += " --uc"
189196
if rec_behave:
190197
run_cmd += " --rec-behave"
191198
print(run_cmd)

seleniumbase/console_scripts/sb_recorder.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
sbase recorder [OPTIONS]
88
99
Options:
10+
--uc / --undetected (Use undetectable mode.)
1011
--behave (Also output Behave/Gherkin files.)
1112
1213
Output:
@@ -132,6 +133,12 @@ def do_recording(file_name, url, overwrite_enabled, use_chrome, window):
132133
command = "sbase mkrec %s --url=%s --gui" % (file_name, url)
133134
if not use_chrome:
134135
command += " --edge"
136+
if (
137+
"--uc" in command_args
138+
or "--undetected" in command_args
139+
or "--undetectable" in command_args
140+
):
141+
command += " --uc"
135142
command += add_on
136143
poll = None
137144
if sb_config.rec_subprocess_used:

0 commit comments

Comments
 (0)