以下是我用来打开它的代码
string remoteAddress = "http://localhost:4444/wd/hub";
FirefoxProfile profile = new FirefoxProfile();
profile.AcceptUntrustedCertificates = true;
DesiredCapabilities capabilities = DesiredCapabilities.Firefox();
capabilities.SetCapability(FirefoxDriver.ProfileCapabilityName, profile.ToBase64String());
capabilities.SetCapability("firefox_binary", "C:\\Program Files\\Mozilla Firefox\\firefox.exe");
IWebDriver driver = new RemoteWebDriver(new Uri(remoteAddress), capabilities, TimeSpan.FromSeconds(20));
答案 0 :(得分:1)
请确保您使用的是最新的Selenium软件包 - 它应该可以正常工作。