【发布时间】:2023-01-12 09:35:28
【问题描述】:
我无法弄清楚为什么 cypress xpath 不能使用 type()。我有两个命令函数:一个使用 cy.get() 查找元素,另一个使用 cy.xpath()。不幸的是,这是一个动态字段,所以我必须使用 xpath。
<img src=https://i.stack.imgur.com/wXl9q.png">
这就是我使用上述命令的方式。
<img src=https://i.stack.imgur.com/snVn7.png">
错误:
<img src=https://i.stack.imgur.com/08G32.png">
我尝试阅读柏树文档并在互联网上搜索,但是解决方案示例不起作用。我在 Electron 版本:21.0.0,Bundled Node 版本: 16.16.0
【问题讨论】:
-
你能读一下the problems with images of text然后edit把你的文字图片转换成实际的文字吗?可能有用:/help/formatting
标签: cypress cypress-custom-commands