0

假设我正在尝试自动化记事本,并且根据打开的内容,窗口的图块是“记事本”、“记事本 - letter_to_boyfriend.txt”、“记事本 - Readme.txt”等。

当我记录编码的 ui 测试时,它假定标题为“记事本”。现在我想以某种方式自定义测试,以便任何看起来像“记事本*”的标题都足够好。

我该怎么做?抱歉,我目前没有录制代码要分享,但我可能稍后会分享。希望复制起来并不难。

它必须是搜索属性。提前致谢。

4

2 回答 2

3

Doubleclick on the [mapname].uitest, in the UI Control Map select your window, press F4 to see properties, and finally in Search Properties change the Operator from EqualsTo to Contains and the Value to "Notepad".

于 2011-01-26T06:28:45.670 回答
-1
Playback.PlaybackSettings.SmartMatchOptions = SmartMatchOptions.TopLevelWindow;

如需更多帮助:这里

于 2014-09-11T04:28:01.250 回答