WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

Launch WinAppDriver on Slave node in Jenkins connected via JNLP agent

Open alekseystu opened this issue 8 years ago • 4 comments

Hello. I connot launch WinAppDriver via JNLP agent on Jenkins slave node, when I use command in Execute Windows batch command:

cmd.exe /C "C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe" 4723

After clicking Build Now for Job, Jenkins launch and immediately stop WinAppDriver Log:

C:\Jenkins\workspace\Run WinAppDriver>cmd.exe /C "C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe" 4723 
Windows Application Driver listening for requests at: http://127.0.0.1:4723/

Press ENTER to exit.

Exiting...

C:\Jenkins\workspace\Run WinAppDriver>exit 0 
Finished: SUCCESS

If I run tests, I will get error:

selenium.common.exceptions.WebDriverException: Message: Failed to locate opened application window with appId: C:\Application, and processId: 6368

Please, help, How can I use WinAppDriver with Jenkins?

alekseystu avatar Feb 23 '18 15:02 alekseystu

Hi @alekseystu , @hassanuz you can run these commands in Execute Windows batch command First line refers to change in directory and pointing to WinAppDriver Installation folder. Second line refers to starting WinAppDriver externally outside of Jenkins in a command prompt and is ready listening to the commands at 127.0.0.1:4723/wd/hub

running in jenkins

Commands: # cd C:\WinApp
start WinAppDriver.exe 127.0.0.1 4723/wd/hub

In your case change the commands to cd C:\Program Files (x86)\Windows Application Driver start WinAppDriver.exe 127.0.0.1 4723/wd/hub

Hope we can close this issue.

gouthamsam avatar Mar 21 '18 17:03 gouthamsam

It looks apparent that WinAppDriver.exe should be started in a Daemon style as @gouthamsam explained here, otherwise it will just quit together with the parent CMD process. Suggest safe to close.

xied75 avatar Jul 28 '18 22:07 xied75

Closing issue.

hassanuz avatar Jul 31 '18 22:07 hassanuz

@alekseystu I have problem with running winAppDriver fron jenkins server. Could you say how to do it?

dkotowicz avatar Sep 19 '19 17:09 dkotowicz