automated-tests - 脚本仅在 ie 浏览器中挂起
问题描述
我想在 IE11 中执行此代码,但它进入挂起模式而不单击是按钮无法理解原因同时它在 chrome 和 FF 中工作正常
尝试使用选项 -e --skip-js 错误
import { Selector } from 'testcafe';
fixture(' testcafe ie issue')
.page('https://www1.shoppersdrugmart.ca/en/home');
test('testcafe ie issue', async (t) => {
const medicalCannabisImage=Selector('.wg-hdr-nav-img').nth(0);
const ageGatePopUp = Selector('.age-gate');
const pageContainser=Selector('div#app')
const yesAgePopUp = Selector('[data-auid="age-gate-primary"]');
await t.click(medicalCannabisImage);
if (await ageGatePopUp.exists) {
await t.click(yesAgePopUp);
}
});
我想在 IE11 中执行此代码,但它进入挂起模式而不单击是按钮无法理解原因,同时它在 chrome 和 FF 中工作正常。
解决方案
我们已经重现了这个问题,发现它的原因与这个 GitHub 问题有关:
根据团队的评论,修复正在进行中。
更新:
该修复程序已准备就绪,可在 testcafe@v1.0.0-alpha.2 版本中使用。
推荐阅读
- java - java机器代码在同一硬件上是否相同?
- azure-devops - Azure DevOps 扩展构建定义上下文
- google-sheets - 谷歌工作表功能(按名称排序)
- r - 如何在 R mgcv 包中实现具有共同轨迹和不同比例的随机平滑?
- python - 回调中的Python可变参数数量
- sql - (Postgres)如何根据行的值设置值
- python - 使用 x 轴日期范围时不绘制绘图
- android - 混合两个 16 位编码的立体声 PCM 样本,导致生成的音频中出现噪音和失真
- android - 如何检查文件夹是否存在于垃圾箱中或不在谷歌驱动器中?
- java - 当 Int 值从零/0 开始时,为什么不显示精确值?