Reputation: 10820
Suppose I am trying to automate notepad, and depending on what is open, the tile of the window is either "Notepad", "Notepad - letter_to_boyfriend.txt", "Notepad - Readme.txt", etc.
When I recorded the coded ui test, it assumed the title "Notepad". Now I want to customize the test somehow, so that any title that looks like "Notepad*" would be good enough.
How can I do so? Sorry, I do not have recorded code to share at the moment, but I might later. Hopefully it is not that hard to reproduce.
It has got to be the search property. Thanks in advance.
Upvotes: 0
Views: 5575
Reputation: 1
Playback.PlaybackSettings.SmartMatchOptions = SmartMatchOptions.TopLevelWindow;
For more help: Here
Upvotes: -1
Reputation: 3073
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".
Upvotes: 3