1

Using Azure Hosted Windows agents I am trying to run Functional tests on browsers like Chrome, Firefox, IE and Edge. All the tests are running fine, except for the ones on Edge. The logs show error:

Microsoft Web Driver can't be used with the Built-In Administrator account or while User Account Control is turned off.

How to solve this issue? I want to continue using the Hosted agents and not have to host my own agents. Thanks!

I tried running command line tasks to disable UAC, and then the vstest task, but that did not work, continued getting the same error.

reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
Mengdi Liang
  • 17,577
  • 2
  • 28
  • 35

1 Answers1

0

For hosted agent, the VM runs as administrator. But as the Edge default security defined, this administrator role could not run with in Edge.

To solve it, you can make a few changes in its security options.

Just go Local Security Policy-> Security Options-> User Account Control Admin Approval Mode for the Built-in Administrator account, then enable it.

enter image description here


Note: What I am using is win10 enterprise.

Mengdi Liang
  • 17,577
  • 2
  • 28
  • 35
  • I am using Azure pipelines i.e. MS hosted agents and i believe for each run i will get a new/fresh VM so the above mentioned changes to the security settings wont persist. I am looking for maybe a command or powershell script etc to do the above, so i can run it as a task in the pipeline – user12144819 Oct 01 '19 at 16:49
  • @user12144819 No, not yet. The solution I mentioned is for local configuration, which would not be affected by agent VM. – Mengdi Liang Oct 01 '19 at 16:53