Skip to content

Commit 9ede4b5

Browse files
authored
Merge pull request #2452 from seleniumbase/fix-option-for-3d-apis
Fix option for enabling 3D APIs
2 parents ca8451d + 7210dd4 commit 9ede4b5

File tree

5 files changed

+29
-4
lines changed

5 files changed

+29
-4
lines changed

examples/test_3d_apis.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from seleniumbase import BaseCase
2+
BaseCase.main(__name__, __file__)
3+
4+
5+
class ThreeJSTests(BaseCase):
6+
def test_animation(self):
7+
if self.headless:
8+
self.open_if_not_url("about:blank")
9+
self.skip("Skip this test in headless mode!")
10+
if self.is_chromium() and not self.enable_3d_apis:
11+
self.get_new_driver(enable_3d_apis=True) # --enable-3d-apis
12+
url = "https://threejs.org/examples/#webgl_animation_skinning_morph"
13+
self.open(url)
14+
self.switch_to_frame("iframe#viewer")
15+
self.sleep(0.8)
16+
self.click('button:contains("Wave")')
17+
self.sleep(3)

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ filelock>=3.12.2;python_version<"3.8"
99
filelock>=3.13.1;python_version>="3.8"
1010
platformdirs>=4.0.0;python_version<"3.8"
1111
platformdirs>=4.1.0;python_version>="3.8"
12+
typing-extensions>=4.9.0;python_version>="3.8"
1213
parse>=1.20.0
1314
parse-type>=0.6.2
1415
pyyaml>=6.0.1

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.23.0"
2+
__version__ = "4.23.1"

seleniumbase/core/browser_launcher.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,10 @@ def _set_chrome_options(
10301030
if swiftshader:
10311031
chrome_options.add_argument("--use-gl=angle")
10321032
chrome_options.add_argument("--use-angle=swiftshader-webgl")
1033-
elif not is_using_uc(undetectable, browser_name):
1033+
elif (
1034+
not is_using_uc(undetectable, browser_name)
1035+
and not enable_3d_apis
1036+
):
10341037
chrome_options.add_argument("--disable-gpu")
10351038
if not IS_LINUX and is_using_uc(undetectable, browser_name):
10361039
chrome_options.add_argument("--disable-dev-shm-usage")
@@ -2698,7 +2701,10 @@ def get_local_driver(
26982701
if swiftshader:
26992702
edge_options.add_argument("--use-gl=angle")
27002703
edge_options.add_argument("--use-angle=swiftshader-webgl")
2701-
else:
2704+
elif (
2705+
not is_using_uc(undetectable, browser_name)
2706+
and not enable_3d_apis
2707+
):
27022708
edge_options.add_argument("--disable-gpu")
27032709
if IS_LINUX:
27042710
edge_options.add_argument("--disable-dev-shm-usage")

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
'filelock>=3.13.1;python_version>="3.8"',
143143
'platformdirs>=4.0.0;python_version<"3.8"',
144144
'platformdirs>=4.1.0;python_version>="3.8"',
145+
'typing-extensions>=4.9.0;python_version>="3.8"',
145146
'parse>=1.20.0',
146147
'parse-type>=0.6.2',
147148
'pyyaml>=6.0.1',
@@ -233,7 +234,7 @@
233234
'pdfminer.six==20221105;python_version<"3.8"',
234235
'pdfminer.six==20231228;python_version>="3.8"',
235236
'cryptography==39.0.2;python_version<"3.9"',
236-
'cryptography==42.0.0;python_version>="3.9"',
237+
'cryptography==42.0.1;python_version>="3.9"',
237238
'cffi==1.15.1;python_version<"3.8"',
238239
'cffi==1.16.0;python_version>="3.8"',
239240
"pycparser==2.21",

0 commit comments

Comments
 (0)