Skip to content

Commit e014f72

Browse files
committed
Add option to enable WebGL and 3D APIs
1 parent c000e32 commit e014f72

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
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

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

0 commit comments

Comments
 (0)