我正在尝试空手道UI测试工具。我认为如果url不匹配,命令"waitForUrl“应该无法通过测试。但是我的测试是绿色的,即使url不匹配。我必须使用两个命令("waitForUrl“和"match")才能使测试失败吗?
我的功能文件:
Feature: web-browser automation
Background:
* configure driver = { type: 'chrome' }
Scenario: Search for Karate on Google
Given driver 'https://www.google.com'
And maximize()
And delay(2000)
And input("input[name=q]", 'Karate')
And click("input[name=btnK]")
When click("/(//div//a/h3)[1]")
Then retry(5, 2000).waitForUrl('https://github.com/intuit/karate')

发布于 2020-05-01 01:50:17
这是一个bug,感谢你找到它。它在develop中被修复:https://github.com/intuit/karate/issues/1125
如果可能的话,你可以遵循开发指南,看看它是否有效,那就太好了:https://github.com/intuit/karate/wiki/Developer-Guide
https://stackoverflow.com/questions/61528804
复制相似问题