0
 this.SearchProperties[WinWindow.PropertyNames.ClassName] = ".class1 or .class2";
  • have you tried: ".class1, .class2" ? – lauda Sep 8 '16 at 9:47
1

you could use the FilterProperties if it is supported by the technology you use to find your control.

FilterProperties works as a "Or" when SearchProperties works as a "And".

The code should be:

this.FilterProperties[WinWindow.PropertyNames.ClassName] = ".class1"
this.FilterProperties[WinWindow.PropertyNames.ClassName] = ".class2";

You can still combinated it with the SearchProperties (but for other properties otherwise the SearchProperties will have predominance on the FilterProperties).

this.SearchProperties[WinWindow.PropertyNames.Name] = "MyControl";
this.FilterProperties[WinWindow.PropertyNames.ClassName] = ".class1"
this.FilterProperties[WinWindow.PropertyNames.ClassName] = ".class2";
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.