Safaridriver could not launch because it is not configured correctly

726 Views Asked by At

Whenever my Test Scripts start to Run when I build my JOB in Jenkins, I get this error i.e. ERROR: safaridriver could not launch because it is not configured correctly or you need to authenticate. Re-run safaridriver(1) and pass the '--enable' flag to configure and/or authenticate. For more information, consult the safaridriver(1) man page. [ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 24.1 FAILURE! org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:9311

The browser runs fine whenever I run it via TestNG or MAVEN. I've been stuck on this for a long time now, tried so many things but to no Avail.

1

There are 1 best solutions below

0
On

I'm having the same issue. I'm running web automation via webdriverIO. I can launch safari tests manually and they run just fine. No issues.

When Jenkins tries to run safari tests, I see the same error as above. I only have one user configured on this mac mini and it's the jenkins user. It has admin permissions.

I have run the safaridriver --enable command countless times. I added it to run during the jenkins job as well with no luck.

Not having issues running any other jobs on other browsers.

I just upgraded the mac mini I'm running this on to Mojave. Not sure if that's related.