【发布时间】:2020-11-04 07:45:30
【问题描述】:
代码:
<ul> <li> <h1>source</h1> <label>completed</label> </li> <li> <h1>source</h1> <label>Failed</label> </li> <li> <h1>new test</h1> <label>completed</label> </li> </ul>
上下文:我在 ul 中有这样的代码我有几个 li 元素。我需要使用 Cypress 编写 if else 语句。如果 li 元素在 h1 中有文本源并且标签有文本 Completed 我需要单击该元素否则跳过。
【问题讨论】:
-
请发布您尝试的代码 sn-p 以及您遇到的错误。
-
-
source
-
source
-
新测试
-
标签: html automated-tests cypress cypress-cucumber-preprocessor