簡體   English   中英

Selenium Geckodriver 打不開 URL

[英]Selenium Geckodriver does not open the URL

我想在 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 加載正常。 奇怪的...

將其更改為 driver.get(" http://www.google.com/ "); 您可以使用 driver.timeOut() 調整 webdriver 等待

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM