Could not find default Chrome binary

2019-07-22 00:35发布

I am using the chrome webdriver for a project which works well when I run it on my local pc, however when I uploaded the project to my remote server for it to run live, the chromedriver could not load:

this is how I am calling my chromedriver:

IWebDriver driver = new ChromeDriver(@"C:\Users\User\Downloads\chromedriver_win_26.0.1383.0");

this is the error I get:

Could not find default Chrome binary

I have made sure that:

  1. the chromedriver.exe actually is in the specified location on the server
  2. I upload the dlls needed for it to run

Any ideas please as to why this is happening?

1条回答
我命由我不由天
2楼-- · 2019-07-22 00:49

The WebDriver part is fine, but I found that the problem is that the code can't find Chrome.exe itself.

It should be installed in this folder: C:\Users\%USERNAME%\AppData\Local\Google\Chrome\Application\chrome.exe

Please check this on Requirements: http://code.google.com/p/selenium/wiki/ChromeDriver

P.s: I tested myself and it works now. :)

查看更多
登录 后发表回答