This project is read-only.

Using White In-Process

May 17, 2008 at 3:42 PM
I'm using White to automate some UI interactions for Visual Studio. As I need some information provided by VS to drive the automation process, I need to run the White automation as a VS Package. This means I'm using it in the same process that's being tested.

In the last release, the Window class does a WaitWhileBusy in the constructor:

        public Window(AutomationElement automationElement, InitializeOption initializeOption, WindowSession windowSession)
            : base(automationElement, new NullActionListener(), initializeOption, windowSession)

In my scenario, it will never succeed, as it will be busy when the automation is being executed, so it always fail. Would it be possible to only do the WaitWhileBusy if the window does not belong to the current process?

May 17, 2008 at 6:46 PM
Interesting point. Never thought of it.
You should be able to do this very easily. AutomationElement of window can provide you the ProcessId which you can compare with VS processid.
This might turn out to be tricky because you do need to wait till your action ends.

Let me know how it goes.

I would try to something about it in the future releases.