【问题标题】:Selenium Geckodriver does not open the URLSelenium Geckodriver 不打开 URL
【发布时间】:2020-09-01 06:57:20
【问题描述】:

我想在 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。我没有收到任何错误代码。

更新: 当我不加载任何配置文件时,URL 加载正常。奇怪……

【问题讨论】:

  • 我不明白....有什么想法吗? :)

标签: c# selenium firefox geckodriver


【解决方案1】:

改成 driver.get("http://www.google.com/"); 您可以使用 driver.timeOut() 调整 webdriver 等待

【讨论】:

  • 不幸的是它对我不起作用。我更新了我的第一篇文章,当我不加载任何配置文件时,URL 加载正常
猜你喜欢
  • 1970-01-01
  • 2018-03-25
  • 2011-11-12
  • 2017-05-24
  • 1970-01-01
  • 2017-12-20
  • 1970-01-01
  • 2013-09-17
  • 2018-10-16
相关资源
最近更新 更多