playwright: 对元素进行click的时候失败,intercepts pointer events

问题

执行click()报如下错误

 .....
  element is visible, enabled and stable
  scrolling into view if needed
  done scrolling
  <div class="bg-white p-[36px] rounded-[12px] relative…></div> intercepts pointer events
  retrying click action, attempt #2
  waiting 20ms
  waiting for element to be visible, enabled and stable

playwright: 对元素进行click的时候失败,intercepts pointer events_第1张图片

解决方法

在执行click的时候,会进行可操作性检查,可以添加 force=True参数,就不会进行此检查,即 element.click(force=True)

你可能感兴趣的:(playwright,经验分享,playwright,python,自动化)