Selenium Geckodriver无法打开URL

问题描述 投票:0回答:1

我想在Firefox加载后打开一个页面:

FirefoxOptions options = new FirefoxOptions();
options.AddArguments("-profile", @"C:\SomeFolder\firefox" + @"\" + profilename + @"\");
IWebDriver driver = new FirefoxDriver(options);
Thread.Sleep(2000); //I've tried without Threed.Sleep too)
driver.Navigate().GoToUrl("http://www.google.com/");

Firefox打开,但未加载URL。我没有任何错误代码。

c# selenium firefox geckodriver
1个回答
0
投票

将其更改为driver.get(“ http://www.google.com/”);您可以使用driver.timeOut()

调整WebDriver等待
© www.soinside.com 2019 - 2024. All rights reserved.