Google Chrome Exe path on MAC

8,635 views
Skip to first unread message

Alok Pattnaik

unread,
Jan 15, 2013, 8:00:18 AM1/15/13
to seleniu...@googlegroups.com
Hi All

I am facing an issue on MAC where by I am unable to open Google chrome via Web Driver

Here is my Code snippet:

System.setProperty("webdriver.chrome.driver","/Users/ankitgarg/Documents/workspace/Selenium/bin/chromedriver.exec");
 
 ChromeDriver chromedriver = new ChromeDriver();
 
 chromedriver.get("http://new.livestream.com/");


On Executing the above code . I get the following exception:

 Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: /Users/ankitgarg/Documents/workspace/Selenium/bin/chromedriver.exec

Although the chrome exe is available on the specific path , Still I get the exception.


Any suggestions /code is highly appreciated.


Thanks
Alok




Krishnan Mahadevan

unread,
Jan 15, 2013, 8:04:10 AM1/15/13
to seleniu...@googlegroups.com
Alok,
Please do the following in a Terminal. 
Use "cd" to navigate to the directory where the chrome driver binary exists [ the one that you downloaded from the selenium site ]
Run a ls -ltr and share the output. 
Run a "pwd" and share the output. 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/fQ9Z3dSRhwgJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
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/

Oscar Rieken

unread,
Jan 15, 2013, 8:12:32 AM1/15/13
to seleniu...@googlegroups.com
if chromedriver is in your path in terminal you can do a 
which chromedriver
and it should give you a path if it is available
if its not then you didnt add it to a directory in your path or add the directory chromedriver exists in to your path
if it does show up with a path you can try and launch it by typing 
chromedriver

you should get something like 
Started ChromeDriver
port=9515
version=21.0.1180.4
log=/chromedriver.log

what puzzles me is that you said the chromedriver exe
linux and mac dont use exe's so hopefully it was just a mis understanding


Alok Pattnaik

unread,
Jan 17, 2013, 9:06:43 AM1/17/13
to seleniu...@googlegroups.com
Thanks Guys!! . Your valuable suggestions helped me a lot.

Alok Pattnaik

unread,
Jan 22, 2013, 8:30:21 AM1/22/13
to seleniu...@googlegroups.com
Hi All


I need help on configuring Chrome via selenium webdriver. On one of the machine( MAC) . The script open the google chrome. But another MAC it throws  following error:

Started ChromeDriver
port=15683
version=23.0.1240.0
log=/Users/Vijay/Documents/workspace/excelworksheet/chromedriver.log
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.26.0', revision: '18041', time: '2012-11-01 19:33:38'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.5', java.version: '1.6.0_37'
Driver info: driver.version: ChromeDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:526)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:215)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:161)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:107)
    at com.excel.data.login.main(login.java:16)
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '2.26.0', revision: '18041', time: '2012-11-01 19:33:38'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.5', java.version: '1.6.0_37'
Driver info: driver.version: ChromeDriver
    at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:165)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:62)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:505)
    ... 6 more
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:15683/status] to be available after 20013 ms
    at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:104)
    at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:163)

I wrote the following code :

package com.excel.data;

import java.io.IOException;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.openqa.selenium.chrome.*;
public class login {

    public static void main(String[] args) throws InvalidFormatException, IOException {
   
        System.setProperty("webdriver.chrome.driver","/Users/Vijay/Desktop/Vijayselenium/chromedriver");
        ChromeDriver ff =new ChromeDriver();
        ff.get("http://new.livestream.com/");
       
    }
}


Your help will be much appreciated

Thanks

Alok

Mark Collin

unread,
Jan 22, 2013, 8:51:35 AM1/22/13
to seleniu...@googlegroups.com
Do both machines have:

/Users/Vijay/Desktop/Vijayselenium/chromedriver

Alok Pattnaik

unread,
Jan 22, 2013, 9:11:43 AM1/22/13
to seleniu...@googlegroups.com
Yes , On one the chrome driver works. The other throws the error. Is there any work around for this?

Thanks
Alok

Mark Collin

unread,
Jan 22, 2013, 9:37:39 AM1/22/13
to seleniu...@googlegroups.com
are they both chmod +x

Rahul Gudi

unread,
Jan 22, 2019, 10:59:40 PM1/22/19
to Selenium Users


Hi All,
My name is Rahul i am running my selenium tests on chromedriver on MAC when i am running the tests i am getting the issue  ''unknown error: cannot find chrome binary. I have attached the screenshot. 
Screen Shot 2019-01-21 at 10.13.42 PM.png
Screen Shot 2019-01-21 at 10.15.56 PM.png
Screen Shot 2019-01-21 at 10.16.39 PM.png

Renju jose

unread,
Jan 23, 2019, 12:47:13 AM1/23/19
to Selenium Users
Hi Rahul,

Did you check if the executable has required executable permissions?
Cd into the directory where chromedriver is located and use 'ls -l' to check permissions. If executable permission is not there, use chmod to set permissions. Feel free to ask if further help needed.

sridhar k

unread,
Jan 23, 2019, 11:14:43 PM1/23/19
to Selenium Users
Hi Rahul,
    
             Did you check chrome is installed perfectly or not. Selenium looking for chrome path but it is not available, if chrome already installed in your system set the path and try again.

Rahul Gudi

unread,
Jan 24, 2019, 6:54:41 PM1/24/19
to seleniu...@googlegroups.com
The issue is been resolved I am able to run my selenium scripts.

Sent from my iPhone
--
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.

Renju jose

unread,
Jan 24, 2019, 8:34:41 PM1/24/19
to seleniu...@googlegroups.com
Good to hear. Can you let us know what was the issue and how did you solve it?

Thanks and Regards,
Renju Jose

Reply all
Reply to author
Forward
0 new messages