admin管理员组文章数量:1123425
How can I access an element (.slider)
which is inside #shadow-root (closed) using Playwright?
body class='override vsc-initialized'
<div-id='root' class='override'>
#shadow-root (closed)
<div-id='root' class='override'>
<div-id='icons'>
<div-class='slider' style='left: 0px';">
I am trying to locate .slider
on the page:
await page.locator('.slider').hover()
await page.mousedown()
await page.mouse.move(x=100,y=100)
I keep getting this error because playwright does not see that element. What I can do to scroll this slider?
patchright._impl._errors.TimeoutError: Locator.hover: Timeout 30000ms exceeded. Call log:
- waiting for locator(".slider")
本文标签: pythonHow to use an element inside ShadowRoot using PlaywrightStack Overflow
版权声明:本文标题:python - How to use an element inside Shadow-Root using Playwright? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736570612a1944767.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论