简体   繁体   中英

Selenium Geckodriver does not open the URL

I would like to open a page after Firefox loads:

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. I don't get any error code.

Update: When I don't load any profile the URL loads fine. Strange...

Change it to driver.get(" http://www.google.com/ "); You can adjust webdriver wait using driver.timeOut()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM