小编Emi*_*vik的帖子

如何防止 Testcafe 与目标元素交互,即使目标元素与另一个元素重叠?

描述: \n引入该错误会阻止客户单击他应该单击的元素

\n

如何?\n步骤说明: \n以下是在我们的模式中实现 Dialog HTML 标记后我们的支付页面应用程序上发生的情况:

\n
    \n
  • 用户点击提交按钮
  • \n
  • 第一个弹出窗口包含一个 iframe
  • \n
  • 一秒钟后,出现第二个弹出窗口,其中在第一个弹出窗口后面包含第二个 iframe。
  • \n
\n

我们使用的浏览器: chrome 和 firefox。

\n

错误的屏幕截图

\n

testcafe 中的预期行为: Testcafe 应该\xe2\x80\x99t 能够像真实用户一样单击此 \xe2\x80\x9ccheckout\xe2\x80\x9d 按钮\n testcafe 中的实际行为:针对 bug 的绿色测试\nTestcafe 允许单击后台弹出窗口上的按钮。\n因为即使与模式组件中的另一个元素 Dialog HTML 标记重叠,它也会与按钮交互

\n

测试后从 testcafe 收到此警告消息:

\n
When something overlaps the action target, TestCafe performs the action with the topmost element at the original target\'s location.\nThe following element with a greater z-order replaced the original action target: <dialog …
Run Code Online (Sandbox Code Playgroud)

testing automation automated-tests e2e-testing testcafe

6
推荐指数
1
解决办法
391
查看次数