This project is read-only.

Very particular use of White

Nov 7, 2008 at 11:44 AM
I'm trying to use White in a very particular way, but I'm having some problems. Hope someone helps.
I'm doing a GUI Ripper for an automated test application and have been using White in the standard way: launch the AUT from my application with White attached to it and start searching for elements in my application. But that wasn't enough for me. I needed to access the Control objects for some information that White don't provide. Because the AUT was running in a different process I was not able to access it's controls.
So, based on this article I inject my ripper in the AUT. The problem is that White stopped working. If I do something like Application.GetWindows I get a Timeout Exception although the application is running fine with no activity. I'm also unable to do actions. For example, if I Creat a TextBox from a WinForm TextBox's handle and try to set the Text nothing happens. no Exception, no text setted, nothing. But strangely enough if I print the name of the TextBox the correct value is printed.
Can this be happening because of the particular use I'm doing of it? Is this something to do with inputs?
Nov 7, 2008 at 3:21 PM
After some more testing I've narrowed the problem I'm having. I now get the following exception after setting the text on a TextField, for example:

Although the dll were the code is written doesn't have a GUI the process in which the DLL was injected has. The UIItems (created by creating first the AutomationElement from handle and then creating the UIItem using the (AutomationElement, ActionListener) Constructor) have their values setted correctly.

José Tavares
Nov 7, 2008 at 3:48 PM
Solved it.. Sorry for posting without proper testing, but I guess this may be used by someone as a use case.
The problem was that I was creating the UIItem with a ProcessActionListener. For some reason it didn't work with it. I replace it with NullActionListener and it worked.

Sorry again for the rush in posting.
José Tavares