Launch WinAppDriver on Slave node in Jenkins connected via JNLP agent
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?
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
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.
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.
Closing issue.
@alekseystu I have problem with running winAppDriver fron jenkins server. Could you say how to do it?