dom中的playwright元素(但不在定位器中)在调试模式下运行良好,方法是在其上放置一个调试点

TestWhite
TestWhite
订阅者
258
文章
0
粉丝
测试交流评论396字数 232阅读0分46秒阅读模式
摘要定位器。单击:目标已关闭 ===================日志=========================== 等待帧“#沙盒测试数据库容器“; 选择器解析为可见(&a...
locator.click: Target closed
=========================== logs ===========================
waiting for frame "#sandbox-test-db-container"
selector resolved to visible <iframe lang="en" scrolling="yes" title="Content body" i…></iframe>
waiting for selector "#sandbox-test-db-container >> control=enter-frame >> g:nth-child(273) > circle"
selector resolved to visible <circle r="7" cx="209.86857670732482" cy="106.8619269650…></circle>
attempting click action
waiting for element to be visible, enabled and stable
element is not stable - waiting...
element was detached from the DOM, retrying
waiting for frame "#sandbox-test-db-container"
selector resolved to visible <iframe lang="en" scrolling="yes" title="Content body" i…></iframe>
waiting for selector "#sandbox-test-db-container >> control=enter-frame >> g:nth-child(273) > circle"
============================================================

如果我在调试模式下运行,将调试点放在上面。它运行成功。
我试图点击一个滑块(开关)来渲染d3地图,然后点击d3地图中的一个圆。
测试代码段

      this.page.frameLocator('#sandbox-test-db-container').locator('.oui-react-slider').click(),
      this.page.frameLocator('#sandbox-test-db-container').locator('g:nth-child(273) > circle').click(),
      this.page.frameLocator('#sandbox-test-db-container').locator('[aria-label="Select all"]').click()
文章源自玩技e族-https://www.playezu.com/180741.html文章源自玩技e族-https://www.playezu.com/180741.html
 
匿名

发表评论

匿名网友
确定

拖动滑块以完成验证