我的 testcafe 测试使用 Internet Explorer 将文本输入到文本字段中,但是当它这样做时,它会在输入文本时删除所有其他字母。
例如:<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cebaabbdba8ebda1a3abbaa6a7a0a9e0ada1a3" rel="noreferrer noopener nofollow">[email protected]</a>
将输入为 <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="84f0f7c4ebe1eceaaae7e9" rel="noreferrer noopener nofollow">[email protected]</a>
await t.typeText(Selector('#email'), '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fb96829e969a9297bb9e969a9297d5989496" rel="noreferrer noopener nofollow">[email protected]</a>')
await t.typeText(Selector('#password'), 'mypassword')
await t.click(Selector('.account-form__button'))
await t.wait(6000);
这是有人见过的东西吗?同样的测试在 Windows 上的 Firefox 和 Chrome 中运行良好。
最佳答案
我尝试使用示例标记检查此场景,如下所示:
<body>
<input type="text" id="email"/><br/>
<input type="text" id="password"/><br/>
<div contenteditable="true" id="editable"></div>
</body>
此测试在 IE 中通过,我没有注意到删除符号有任何问题。我建议您查看最新的 testcafe 版本 0.23.3,看看此行为是否可以重现。 如果您认为自己遇到了错误,我建议您创建一个新问题并填写 https://github.com/DevExpress/testcafe/issues/new?template=bug-report.md 中的所有字段。
关于javascript - TestCafe - Windows 10 上的 Internet Explorer 11 输入文本问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52598863/