Can't get control that is in raw view (uiSpy)

Apr 27, 2009 at 8:35 PM
Hello,

I'm having trouble getting my white tests to get a control that is only visible in raw view of UI Spy.  I've done some searching and there is an older thread (http://white.codeplex.com/Thread/View.aspx?ThreadId=24677) which is my exact issue, and the corresponding ticket (http://white.codeplex.com/WorkItem/View.aspx?WorkItemId=1824) which was closed and fixed in release 0.17.  I am using 0.17 but it still doesn't seem to work for me.  Should I be able to get the control the same way I would any other?

Ex.
var searchCriteria = SearchCriteria.ByText("Remove a Revision");
var label = window.Get<label>(searchCriteria);

I've even tried to get every control of type "System.Windows.Automation.ControlType.Text" found on my page, but it still doesn't find the one that I'm looking for.

Am I missing something?

Thanks.
Apr 29, 2009 at 2:32 PM
To get around this, I'm trying to use the RawViewWalker that has been mentioned.  I've never used this before and I'm doing a lot of research online to try and figure it out, but I'm not finding it very easy.

Can anybody give me an example of using the RawViewWalker to get some controls from the UI?
Coordinator
May 25, 2009 at 6:20 AM

Can you try out 0.18. Checkout UIItems section in the documentation

Jun 10, 2009 at 10:47 PM

Hi Vivek,

I'm now using version 0.18, but I still can't get any elements that only show up in Raw view in UISpy.

 

Coordinator
Jun 15, 2009 at 4:18 PM

have you checked section on WPFUIItems here

http://white.codeplex.com/Wiki/View.aspx?title=UI%20Items

Jun 16, 2009 at 2:14 PM

Yes I took a look at the WPFUIItems in that documentation, but still no luck.  My app isn't a WPF app, it's a SilverLight app.  Might that be the problem?

Jun 19, 2009 at 8:36 PM

Update:

I was able to get control of a text control type that was only shown in Raw view of UI Spy.  I had to use the "GetElement" method.

           var searchCriteria = SearchCriteria.ByText("Text to search for");
            var textNeeded = AppEnvironment.window.GetElement(searchCriteria);
Coordinator
Jun 25, 2009 at 3:15 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.