边缘浏览器无法检测到span元素,而Chrome和Firefox可以

时间:2020-02-20 10:36:38

标签: testing automated-tests ui-automation e2e-testing testcafe

我有一个简单的测试,我只想通过单击登录后显示的元素之一来检查登录是否成功。

测试在Chrome和Firefox中通过,但在Microsoft Edge 18.18363 / Windows 10中失败

The specified selector does not match any element in the DOM tree.

   | 'span'
 > |   withText('CONTRACTS')

我是TestCafe的新手,我可以忽略它吗?

all technologies used on the website

1 个答案:

答案 0 :(得分:0)

好像TestCafe支持1.8.0版的MS Edge热门产品:https://github.com/DevExpress/testcafe/releases/tag/v1.8.0

我们使用yarn作为依赖项管理器,并将通过运行

来检查依赖项的版本
$ yarn list testcafe
yarn list v1.22.0
warning Filtering by arguments is deprecated. Please use the pattern option instead.
└─ testcafe@1.8.2
✨  Done in 0.24s.

您可以运行yarn upgrade testcafedoc)在package.json指定的范围内更新版本,该范围可能允许或不允许1.8.0。

取决于开发团队的繁文tape节,您可以使用yarn upgrade testcafe --latest更新到最新版本,但请注意,将更新package.json,这会影响所有团队成员。因此,我建议您在推送更新的package.json之前先询问您的团队负责人。

哦,如果您使用npm而不是yarn作为程序包管理器,则命令将有所不同。

检查安装的版本: npm outdated

更新testcafe: npm update testcafe

希望这会有所帮助!我通过大量的Google搜索(例如“更新节点程序包特定版本”。

相关问题