Question

I am trying White for the first time. I tried to run a sample test to get a window of notepad, it doesnt seem to work. Here is what I did:

//Launch the app

Application app = Application.Launch("notepad.exe");

//Get the main window after launching the app

Window win = app.GetWindow("Untitled - Notepad");   

This last line throws an error as type initializer exception. When I go into the source code for White, it fails at finding the window.

When I used GetWindows() and try to get first window, it works fine.

But the same error is thrown for the child objects as well.

I have Win7, 32 bit. By build configuration is Debug|x86. I also tried the same code on Win XP, 32 bit and it worked well.

Can anyone please tell me how do I go about this.

Was it helpful?

Solution

I think I found the solution. When I tried running same code on a Win 7, 64 bit machine, it seemed to work perfectly alright.
I tried using the dependency walker and found that there is some issue with the dlls on my machine. Though I dont think I can get my system fixed just for that, I guess it might help others if they are facing this issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top