Unable to start the server: another safaridriver is already running

154 views
Skip to first unread message

Mayank Mittal

unread,
Aug 15, 2017, 10:42:25 PM8/15/17
to Selenium Users
Hi Guys!!

I'm getting  Unable to start the server: another safaridriver is already running.

Already enabled "allow remote automation" option in develop menu.

Kindly help.

Krishnan Mahadevan

unread,
Aug 15, 2017, 10:56:20 PM8/15/17
to seleniu...@googlegroups.com

Mayank,

 

What does your test look like?

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1d6c85c8-fba4-4281-9cb0-ce24a0feafd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mayank Mittal

unread,
Aug 17, 2017, 12:21:49 PM8/17/17
to Selenium Users

package Test;


import org.openqa.selenium.WebDriver;

import org.openqa.selenium.safari.SafariDriver;



public class BrowserInvoke {


public static void main(String[] args) {

WebDriver driver = new SafariDriver();


driver.get("https://google.com");

System.out.println(driver.getTitle());


}


}


This is the test. I tried killing the process and run again. It worked, But when I tried again it gave the same error.
Do I need to kill the process each and every time I run the case on Mac? Please help.

Krishnan Mahadevan

unread,
Aug 17, 2017, 12:28:01 PM8/17/17
to seleniu...@googlegroups.com

The bug lies in your code. You have not invoked driver.quit()

If you don’t invoke driver.quit() the server binary is not exited and that’s why you are getting that error.

 

Here’s a sample that shows what I am talking about :

 

public class SafariDriverTest {
   
public static void main(String[] args) {
        SafariDriver driver =
new SafariDriver();
       
try {
            driver.get(
"http://www.google.com");
            System.
err.println("Title :" + driver.getTitle());
        }
finally {
            driver.quit();
        }
    }
}

 

 

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <seleniu...@googlegroups.com> on behalf of Mayank Mittal <mayank...@gmail.com>


Reply-To: <seleniu...@googlegroups.com>
Date: Thursday, August 17, 2017 at 9:51 PM
To: Selenium Users <seleniu...@googlegroups.com>

--

You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages