microsoft / WinAppDriver

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

WinAppDriver remote execution not happening when system is locked #1179

Open Kavin19 opened 4 years ago

Kavin19 commented 4 years ago

As part of continuous integration we are executing our WinAppDriver test scripts in a remote machine.

We noticed that WinAppDriver remote execution is not happening when system is locked.

What can be the effective workaround or recommendations for this issue.

VijayHugar commented 4 years ago

UI automation requires keyboard or mouse to interact with UI. Hence when you lock a system, UI interaction will fail. I achieved this by Configuring Azure agent to run with auto-logon and interactive mode.

Here are the azure tasks Agent runs on Remote machine with interactive mode and auto logon enabled. So when release deployment starts, following azure tasks gets executed.

  1. Restart machine. 2.Deploy latest files 3.Start WinAppDriver 4.Set Screen-resolution ( you may skip if not required) 5.VSTest - execution 6.Stop WinAppDriver

For more info, refer the link https://blogs.windows.com/windowsdeveloper/2019/05/13/announcing-ui-tests-in-ci-cd-for-desktop-app-developers/

VijayHugar commented 4 years ago

@Kavin19 can you please confirm whether your issue is resolved with above solutions? So that we can close this issue.