我寫自動化系統,並完美地在本地主機工作,但是當我嘗試發佈它並上傳到服務器。我得到這個錯誤;無法定義硒鉻驅動程序路徑
unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86_64)
我日凌晨1十億確保這條道路的,這裏是我的代碼
var outPutDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase);
var options = new ChromeOptions();
var driverPath = Path.Combine(outPutDirectory, "ChromeDriverInThisFolder\\");
string driver_path = new Uri(driverPath).LocalPath;
driver = new ChromeDriver(driver_path, options);
我的服務器是Windows的Windows NT 6.1 SP1 x86_64的 2008 R2企業版64位
在你已經把chromedriver.exe的服務器? – 2014-12-13 09:41:33
轉換爲「D:\ PathTo \」 – TeknobilSoft 2014-12-13 09:43:53
@TeknoBilSoft,消息非常清晰:chromedriver.exe不在「D:\ PathTo」中。 – Jauch 2014-12-13 10:46:41