[英]Selenium Geckodriver does not open the URL
I would like to open a page after Firefox loads:我想在 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 opens but the URL doesn't load. Firefox 打开,但 URL 不加载。 I don't get any error code.
我没有收到任何错误代码。
Update: When I don't load any profile the URL loads fine.更新:当我不加载任何配置文件时,URL 加载正常。 Strange...
奇怪的...
Change it to driver.get(" http://www.google.com/ ");将其更改为 driver.get(" http://www.google.com/ "); You can adjust webdriver wait using driver.timeOut()
您可以使用 driver.timeOut() 调整 webdriver 等待
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.