This project is read-only.

Can you use a regular expression to search for a Text (SearchCriteria.ByText)

Jun 22, 2009 at 4:08 PM

Is there anyway to use a regular expression when searching by text?

I need to find an object on the screen that has no AutomationID, and the only uniqueness is the text, but the text also contains the build number which obviously will change a lot.  So I wanted to use a regular expression but I can't seem to.  Is there anyway to get this to work?

Jun 25, 2009 at 4:33 PM

are you trying to find a window or uiitem inside it?

Jun 25, 2009 at 4:38 PM

I'm trying to find a UIitem inside the window using the SearchCriteria.ByText, but the text value I want to use changes therefore I was wondering if I could use a regular expression.

Jun 29, 2009 at 4:04 PM

you should probably try using window.Items and then find your UIItem.

Jun 29, 2009 at 4:04 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.