简体   繁体   English

如何使用Squish验证文本

[英]How to verify text using Squish

I am automating a windows application using Squish. 我正在使用Squish自动化Windows应用程序。 I am trying to verify if the required text is displayed in a window after I make some changes in the GUI. 在GUI中进行一些更改后,我试图验证是否在窗口中显示了所需的文本。 I used object spy to get the object ID, but I am confused how to give a test verification point. 我使用对象间谍来获取对象ID,但是对于如何给出测试验证点感到困惑。 The following Verification point says in the results window as 'True' and 'True' are equal. 以下验证点在结果窗口中表示“ True”和“ True”相等。 But I want it to be as, for example 4X and 4X are equal. 但我希望如此,例如4X和4X相等。

test.compare(findObject("{name ='textObjective'}").enabled, True)

Thank You!! 谢谢!!

除了enabled属性,您还可以比较任何其他属性-例如, text

test.compare(findObject("{name ='textObjective'}").text, "4X")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM