在柏树测试跑者中检查元素
我对赛普拉斯是相对较新的,所以这个问题可能有一个明显的答案,但是...
有人注意到使用柏树测试跑者从Chrome检查元素时,DOM看起来有所不同吗?
例如:
当我正常打开Chrome并单击表然后检查元素时,它在DOM中显示了具有关联的Data-E2E属性。它还包含标准的HTML表标签。
当我运行“ NPX柏树打开”并从测试跑步者Chrome检查相同的元素时,同一元素没有data-e2e属性。另外,标准表标签被Angular Kendo标签替换。
当我本地运行该应用程序时,这会发生。
该表充满了从API调用中检索到的数据,所以也许这就是为什么它不同的原因?尽管如此,我想知道是否可以在没有测试失败的情况下通过Data-E2E属性检索该表,因为测试跑步者找不到它。
有人知道从哪里开始吗?
I am relatively new to Cypress so this question may have an obvious answer but...
Has anyone noticed that the DOM looks different when inspecting an element from chrome using the cypress test runner?
For example:
when I open chrome normally and I click on a table then inspect element, it shows in the DOM with an associated data-e2e attribute. It also contains standard html table tags.
when I run 'npx cypress open' and inspect the same element from the test runner chrome, the same element does not have a data-e2e attribute. Also, the standard table tags are replaced with angular kendo tags.
This happens when I'm running the application locally.
The table is dynamically loaded with data retrieved from an api call, so maybe that's why it's different? Still, I'm wondering if I can retrieve that table by data-e2e attribute without the test failing because the test runner cannot find it.
Anyone have any idea where to begin?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论