Could not find default Chrome binary

走远了吗. 提交于 2019-12-12 18:08:57

问题


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:


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. :)



来源:https://stackoverflow.com/questions/17417903/could-not-find-default-chrome-binary

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!