嗨當我使用下面的代碼遠程webdriver的鍍鉻拋出一個「路徑驅動程序可執行文件」的錯誤
IWebDriver _webDriver = new RemoteWebDriver(new Uri("http://127.0.0.1:4444/wd/hub"),
DesiredCapabilities.Chrome());
我得到follwing錯誤
System.InvalidOperationException:在驅動程序的路徑可執行文件必須由webdriver.chrome.driver系統屬性設置;欲瞭解更多信息,請參閱http://code.google.com/p/selenium/wiki/ChromeDriver。最新版本可從http://code.google.com/p/chromedriver/downloads/list 下載TearDown:System.NullReferenceException:未將對象引用設置爲對象的實例。 在OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(響應錯誤響應) 在OpenQA.Selenium.Remote.RemoteWebDriver.Execute(字符串driverCommandToExecute,Dictionary`2參數) 在OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor ,ICapabilities desiredCapabilities) at Browser.cs中的Testframework.Browser.RemoteGoto(String browser,String url):line 86 at TestFramework.CommonAction.RemoteBrowser(String browser)in CommonAction.cs:line 70 at Test.RegistrationTest.InvalidRegistrationTest (String browser,String username,String password,String confirmPassword,String securityQuestion,String securityAnswer,String errorMessageText,String firstname,String lastname):Line 50 --TearDown 在Testframework.CommonAction.CaptureScreen(字符串文件名)在CommonAction.cs:線121 在Test.RegistrationTest.SnapshotOnFailure()在RegistrationTest.cs:線590
嗨,我能夠找到只有java的例子,你能告訴我如何設置在C#webdriver遠程鉻的路徑,因爲我無法找到在C#q – 2013-03-04 11:35:23
編輯向您展示。 – Arran 2013-03-04 12:30:18
謝謝你,這是我設置的路徑options.BinaryLocation = @「.. \ RequiredFiles \ chromedriver_win_26.0.1383.0 \ chromedriver.exe」;我收到以下錯誤「驅動程序可執行文件的路徑必須由webdriver.chrome.driver系統屬性設置」 – 2013-03-04 13:03:14