gpt4 book ai didi

Karate UI - 如何在测试结束时断言 url?

转载 作者:行者123 更新时间:2023-12-04 10:07:08 24 4
gpt4 key购买 nike

我正在尝试空手道 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')

enter image description here

最佳答案

这是一个错误,感谢您找到它。固定在develop :https://github.com/intuit/karate/issues/1125

如果您可以遵循开发指南并查看它是否有效,那就太好了:https://github.com/intuit/karate/wiki/Developer-Guide

关于 Karate UI - 如何在测试结束时断言 url?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61528804/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com