编码的UI测试 - 标签更改。 [英] Coded UI Tests - Label changes.
问题描述
我在Web应用程序上运行encodeUI测试。我已经写了好几本,但我注意到当标签的标题发生变化时,会产生错误,并停止运行编码的UI测试。创建的错误是:
I am running a codedUI test on a web application. I have several written already, but I noticed that when the title of a label changes, it creates an error, and stops running the coded UI test. The error that is created is :
失败 Smoke_TC718 OCAS.SmokeTest Assert.Fail失败。浏览器标题验证[包含]失败。预期:个人信息1,实际:个人信息 - Windows Internet Explorer
Failed Smoke_TC718 OCAS.SmokeTest Assert.Fail failed. Browser Title Validation [Contains] Failed. Expected: Personal Information 1, Actual: Personal Information - Windows Internet Explorer
有没有办法绕过这些错误,或者告诉codedUI测试不要检查标签的差异。
Is there any way to bypass these errors, or to tell the codedUI test not to check for differences in labels.
任何帮助都会有很大的帮助。
Any help would be greatly apprictated.
谢谢,Nate。
推荐答案
让我有点困惑。据我了解,错误消息显示"Assert.Fail failed",这意味着您使用Assert.Fail()来验证浏览器的标题。那是对的吗?因此,如果您不想再检查浏览器的标题,只需删除Assert.Fail()
It confuses me a bit. As I understand, the error message says "Assert.Fail failed", it means you use Assert.Fail() to verify Browser's title. Is that correct? So, if you don't want to check Browser's title anymore, just remove the line Assert.Fail()
在我看来,我们应该使用WindowTitles.Contains("something")或枚举PropertyExpressionOperator.Contains for Browser的标题。只有一个浏览器。
In my opinion, we should use WindowTitles.Contains("something") or enum PropertyExpressionOperator.Contains for Browser's title. Just only one browser.
这篇关于编码的UI测试 - 标签更改。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!