This project is read-only.

How can i use regular expression in search properties?

Apr 18, 2013 at 5:18 AM
How can i use regular expression in search properties to find a control ?
Apr 18, 2013 at 6:50 AM
Hi deepakguna,

From https://cuite.codeplex.com/workitem/749:
Using regular expressions to locate controls in Coded UI Test
http://blogs.msdn.com/b/anutthara/archive/2009/08/19/using-regular-expressions-to-locate-controls-in-coded-ui-test.aspx

Also see this discussion:
http://cuite.codeplex.com/discussions/258377
CUITe uses the tilde character ('~') instead of the equals sign ('=') to indicate the "Contains" search property expression operator.

For example,
public CUITe_HtmlSpan navigationBar { get { return Get<CUITe_HtmlSpan>("id~Headerlinks"); }}

CUITe v1.5 already includes a GetChildren() method that can be used to retrieve a specific child control by its index.

As a work-around, you may also use the UITestControl.FindMatchingControls() method as illustrated in this article:
http://blogs.us.sogeti.com/falkdj/2011/12/16/how-to-search-thru-a-container-for-a-desired-control/
Feb 14, 2014 at 7:38 PM