WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

Automation for app installation with UAC

Open Shreyanshkhemesara opened this issue 1 year ago • 2 comments

I am trying to automate testing for an agent desktop service. Its first step is installing that agent service. Following steps take place: 1. open MSI 2. click next 3. click i agree to terms and condition 4. click next 5. click next -> this prompts up with UAC window. I am able to automate things till here , but the click on UAC window is not happening.

  1. Tried to do click on elementByname("YesButton") / xml path
  2. Tried to send "left arrow key" and then "enter" ( to switch to "yes" from "no" on UAC and then enter to select "Yes") Neither of these things worked.

Is it possible to achieve this? If so, how?

Shreyanshkhemesara avatar Oct 06 '24 06:10 Shreyanshkhemesara

@Shreyanshkhemesara UAC prompt automation is not possible. For this task, consider running your test with elevated privileges.

liljohnak avatar Oct 06 '24 13:10 liljohnak

You need to reduce your UAC settings to "Never notify" if you want to do any installations with scripts. Most of the installers offers silent installation with powershell, check your app.

HowTurnRight avatar Oct 10 '24 12:10 HowTurnRight