admin管理员组文章数量:1307662
I'm experimenting with the seleniumbase recorder:
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class RecorderTest(BaseCase):
def test_recording(self):
self.open(";)
self.open_if_not_url("/")
self.click("div#w-node-_34a5347c-0ce5-6d17-2d9f-a58420b1d5a0-f4a1d267 a")
self.open_if_not_url("/users/sign_in")
self.type('input[name="email"]', "***@gmail")
self.type('input[name="password"]', "***")
self.click('button:contains("Sign In")')
Itseems to work until, I login and then I get the screenshot. I'm using conda and python 3.12.
The browser opened by the recorder is:
Chrome Version 123.0.6312.105 (Official Build) (64-bit)
How can I get this working?
I'm experimenting with the seleniumbase recorder:
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class RecorderTest(BaseCase):
def test_recording(self):
self.open("https://my.site")
self.open_if_not_url("https://my.site/")
self.click("div#w-node-_34a5347c-0ce5-6d17-2d9f-a58420b1d5a0-f4a1d267 a")
self.open_if_not_url("https://my.site/users/sign_in")
self.type('input[name="email"]', "***@gmail")
self.type('input[name="password"]', "***")
self.click('button:contains("Sign In")')
Itseems to work until, I login and then I get the screenshot. I'm using conda and python 3.12.
The browser opened by the recorder is:
Chrome Version 123.0.6312.105 (Official Build) (64-bit)
How can I get this working?
Share Improve this question edited Feb 2 at 19:00 user1592380 asked Feb 2 at 18:33 user1592380user1592380 36.4k105 gold badges312 silver badges551 bronze badges1 Answer
Reset to default 1To enable WebGL in SeleniumBase
, use --enable-3d-apis
or set enable_3d_apis=True
.
First example:
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__, "--enable-3d-apis")
class ThreeJSTests(BaseCase):
def test_animation(self):
if self.is_chromium() and not self.enable_3d_apis:
self.get_new_driver(enable_3d_apis=True) # --enable-3d-apis
url = "https://threejs./examples/#webgl_animation_skinning_morph"
self.open(url)
self.switch_to_frame("iframe#viewer")
self.sleep(0.8)
self.click('button:contains("Wave")')
self.sleep(3)
Second example:
from seleniumbase import SB
with SB(enable_3d_apis=True, test=True) as sb:
sb.open("threejs./examples/#webgl_animation_skinning_morph")
sb.switch_to_frame("iframe#viewer")
sb.set_text_content("#info p", "Hi, I'm Michael Mintz")
sb.add_css_style("#info p{zoom: 2.54}")
sb.sleep(0.8)
sb.click('button:contains("Wave")')
sb.highlight("#info p")
sb.select_option_by_text("select", "Idle")
sb.click('button:contains("ThumbsUp")')
sb.set_text_content("#info p", "I created SeleniumBase")
sb.highlight("#info p")
sb.sleep(0.8)
sb.click('button:contains("Jump")')
sb.sleep(1.5)
本文标签: selenium chromedriverWebGL not supported by browser in SeleniumbaseStack Overflow
版权声明:本文标题:selenium chromedriver - WebGL not supported by browser in Seleniumbase - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741838637a2400363.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论