【发布时间】:2017-07-14 22:32:02
【问题描述】:
我正在使用驱动程序 chrome 以编程方式点击按钮,但我无法访问 chrome.exe
static IWebDriver driverchromeDriver;
public void chromeDriver()
{
driverchromeDriver = new ChromeDriver(@"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe");
driverchromeDriver.Navigate().GoToUrl("http://www.google.com");
driverchromeDriver.FindElement(By.Id("lst-ib")).SendKeys("qwe");
driverchromeDriver.FindElement(By.Id("lst-ib")).SendKeys(OpenQA.Selenium.Keys.Enter);
}
但它显示了这个问题: 附加信息:文件 C:\Program Files (x86)\Google\Chrome\Application\chrome.exe\chromedriver.exe 不存在。驱动可以在http://chromedriver.storage.googleapis.com/index.html下载
【问题讨论】: