TestStack / White

DEPRECATED - no longer actively maintained
Other
1.02k stars 486 forks source link

Lunch application with Bamboo using remot agent #367

Open gdosreis opened 8 years ago

gdosreis commented 8 years ago

I been running the automated test cases with Bamboo using a remote agent. The problem is that the application is lunched but never is open, and it throw an error saying that the windows is not found.

Error: Initialization method xxxxxx threw exception. TestStack.White.AutomationException: TestStack.White.AutomationException: Couldn't find window with title xxxxxx in process 25956, after waiting for 30 seconds.

some idea of possible solution?

dpisanu commented 8 years ago

Is the Remote Agent a Windows Service? With Windows Vista -> Windows 7 and ongoing Microsoft did some changes with their Services. Where as with Windows XP you were able to set "Service Interactive with Desktop" and let the Service run under a certain user context, this doesn't work anymore with later versions anymore.

So if the Remote Agent is not some process that is started i the user session as the user, opening UIs won't work.

gdosreis commented 8 years ago

@dpisanu Yes, is a Windows Service. what is the possible solution?

dpisanu commented 8 years ago

You'll have to see if you can run the Bamboo Remote Agent as a User and not as a Service. Have a look if there is some sort of exe application in the Installation Directory for the Bamboo Remote Agent that you can start. This will solve the issue. Downside of it. If the Remote Agent crashes there is no Windows Mechanism, like there is for services, that will start it again. For pure Unit Tests or none UI operations, a Service is great but the moment you have Desktop / UI interaction that Service Approach fails.

As said, the Interactive With Desktop is not properly supported anymore. Google for "Interactive Services Dialog Detection" and the problems related to it.

dpisanu commented 8 years ago

Did this solve your issue?

romangoward commented 8 years ago

@dpisanu Hi, I have the same problem with TeamCity agent v9.1.1 running on VM under Windows 10 x32. My TC agent is starting via start-up menu and logon for a user is enable. I can access to this VM via VNC, but I still do not see any active application's windows.

romangoward commented 8 years ago

Well, I've just run shell:Startup and created a shortcut to agent.bat in opened folder. Now it works. MS support provides a wrong information about services sturtup :-|

dpisanu commented 8 years ago

Sounds like this. http://blogs.msdn.com/b/jasone/archive/2012/08/19/windows-8-where-did-the-startup-folder-go.aspx Things changed alot for Win8 and Win10. We haven't done anything past Win7 for our Apps yet. So I am not much help there. Sorry.