microsoft / WinAppDriver

Windows Application Driver
MIT License
3.66k stars 1.4k forks source link

The process "WinAppDriver.exe" with PID xxxx could not be terminated. Reason: Access is denied #1810

Open lovelyplanet2019 opened 1 year ago

lovelyplanet2019 commented 1 year ago

I trigger a job from Jenkins to run the robotframework desktop automation test (Library ApplicationLibrary.DesktopLibrary) at test machine 192.168.2.129.

I figured out in order to make the remote connection works, I have to start the WinAppDriver at test machine by setting its IP and Port, and set them in the test script.

From cmd:

C:\Program Files (x86)\Windows Application Driver>WinAppDriver.exe 192.168.2.129 4723
Windows Application Driver listening for requests at: http://192.168.2.129:4723/
Press ENTER to exit.

The test started and desktop GUI launched and test completed successfully, however error is shown at JENKINS console:

The process "WinAppDriver.exe" with PID 4712 could not be terminated.
Reason: Access is denied.

The test script has the teardown, close application set. Why the WinApp Driver does not terminate? Is that because WinAppDriver was started manually at local machine?

anunay1 commented 1 year ago

What is the logic for closing winappdriver in the tear down method?