MicrosoftWebDriver fails when constructing while running under TeamCity agent's windows service MicrosoftWebDriver fails when constructing while running under TeamCity agent's windows service selenium selenium

MicrosoftWebDriver fails when constructing while running under TeamCity agent's windows service


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

This resolved it for me on Windows 10 Pro N.For full instructions on all Windows versions, check out this link

  1. Press and Hold the Windows key and Press R
  2. In the run dialog box, Type secpol.msc and Press Enter (Opens Local Security Policy)
  3. On the left pane, Navigate to Security Settings > Local Policies >Security Options
  4. Locate User Account Control Admin Approval Mode for the Built-in Administrator account on the right pane. Double Click it to open its properties
  5. Select Enabled in the Local Security Setting tab and Click Ok
  6. Now Restart your computer and check if it works now

enter image description here


The way I solved this issue was create a new user on my windows 10 machine by running the lusrmgr.msc in windows search field. And then use this new user to run the jenkins service (Right click on the jenkins_slave service in the services window and click properties)


enter image description here

Press and Hold the Windows key and Press RIn the run dialog box, Type secpol.msc and Press Enter (Opens Local Security Policy)On the left pane, Navigate to Security Settings > Local Policies >Security Optionsand enable all options as given in image.

it solved my issue on win 10 vm