webdriver : jenkins windows : chrome browser is not opening through jenkins in windows

3,587 views
Skip to first unread message

Mady

unread,
Aug 27, 2013, 9:28:58 AM8/27/13
to webd...@googlegroups.com
Hi, 
chrome browser is not opening through jenkins job in windows xp , throws 'cannot find Chrome binary ' error
Chrome is in default path, and it able to  run and open the chrome browser through command prompt.
below error info
Started ChromeDriver (v2.1) on port 51643
org.openqa.selenium.WebDriverException: unknown error: cannot find Chrome binary
 System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_27'
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
  at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
  at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
  at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
  at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
  at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
  at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:115)
  at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:161)
  at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:107)

darrell

unread,
Aug 28, 2013, 8:50:19 PM8/28/13
to webd...@googlegroups.com
A few things jump to mind. Is Jenkins running the tests as the same user you used to run the Chrome binary from a command prompt? If you log in as yourself, the path variable will be different from say the SYSTEM or Jenkins account. If you can log in as the same account used for Jenkins to run the tests. If that still exists, it looks like it found chromedriver.exe but chromedriver.exe could not find the chrome.exe binary. Read the Selenium wiki on ChromeDriver or go to the ChromeDriver project and see if there is anyone on their wiki which might help.

I know that Selenium had code that did a lot of "if this OS then try this path, else try another path, else ...". If chrome.exe is installed by an administrator account in C:\Program Files it should work. Might be looking in C:\Program Files but it is actually in C:\Program Files (x86). If it was installed as a local user it would be in the C:\Users\<your login>\AppData\... directory. So it would be available to one user but not another.
Reply all
Reply to author
Forward
0 new messages