0

I have Selenium tests that I am running through Jenkins on a build server. The tests all run as expected in Chrome (using ChromeDriver) and Firefox (using FirefoxDriver). However, the tests don't run in Edge using EdgeDriver.

When the tests run it gives an error:

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

I have tried turning UAC on, but that no effect. I tried running the Jenkins service as a different user and that also had no effect. I've tried the suggestions from: MicrosoftWebDriver fails when constructing while running under TeamCity agent's windows service

I can run the tests in the same location from a command prompt, just not through Jenkins.

Matthew van Boheemen
  • 1,087
  • 3
  • 13
  • 21

1 Answers1

0

If you configure jenkins slave agent as a windows services, Will get the issues. Because Edge won't run as a headless browsers.

For avoid those issues. we are not suppose to set a slave agent as window services.

Follow the below steps for setup slave agent and then run your script:

enter image description here

enter image description here

***** Then download the agent.jar and place it under jenkins working directory("D:/Jenkins")

***** Open the command prompt as admin user and execute the commands.

java -jar agent.jar -jnlpUrl http://srv-cbe-com4:8080/computer/T/slave-agent.jnlp -secret 07ba92bb8017901287acb979cf30d40a45c17abd2c0edba5b2b3f17cc94915e8 -workDir "D:/Jenkins"

Balakrishnan
  • 279
  • 2
  • 7