无法在firefox浏览器中导航特定的URL。

时间:2016-09-27 06:34:41

标签: selenium selenium-webdriver

无法在firefox浏览器中导航特定网址。我写了这个示例代码:

public class TestUrl 

{
public static void main(String args[])throws Exception
{


WebDriver fd=new FirefoxDriver();   
Thread.sleep(3000L);
fd.navigate().to("http://www.facebook.com");


}

}

我得到的错误:

  

org.openqa.selenium.firefox.NotConnectedException:45000 ms后无法在端口7055上连接到主机127.0.0.1。 Firefox控制台输出:   dons.xpi DEBUG为{“id”更新XPIState:“sp@avast.com”,“syncGUID”:“{0652d9a4-3656-4279-8810-8a89767444bb}”,“location”:“winreg-app-global”, “版本”: “10.3.5.39”, “类型”: “扩展名”, “INTERNALNAME”:空, “器updateURL”:空, “updateKey”:空, “optionsURL”:空, “optionsType”:空,“aboutURL “:空,” 图标 “:{},” iconURL “:” 铬://sp/content/common/skin/img/logo-safeprice-48.png”, “icon64URL”:空, “defaultLocale”:{ “name”:“Avast SafePrice”,“description”:“安全购物扩展”,“创建者”:“AVAST Software”,“homepageURL”:“http://www.avast.com/”},“visible”:true,“active” :false,“userDisabled”:true,“appDisabled”:false,“descriptor”:“C:\ Program Files \ AVAST Software \ Avast \ SafePrice \ FF”,“installDate”:1474951630115,“updateDate”:1474951630115,“applyBackgroundUpdates “:1,” 引导 “:真正的” 换肤功能 “:假的,” 大小 “:1877359”,sourceURI “:空,” releaseNotesURI “:空,” softDisabled “:假的,” foreignInstall “:真实的,” hasBinaryComponents“:假, “strictCompatibility”:假, “区域设置”:[], “targetApplications”:[{ “ID”:“{ec8030f7-C20A-464f-9b0e-13 a3a9e97384}”, “MINVERSION”: “38.0a1”, “MAXVERSION”: “43.0”}], “targetPlatforms”:[], “multiprocessCompatible”:假 “signedState”:2, “看到”:真}   1474957798423 DeferredSave.extensions.json DEBUG保存更改   1474957798423 addons.xpi DEBUG使用已安装加载项的更改来更新数据库   1474957798424 addons.xpi-utils DEBUG更新附加状态   1474957798425 addons.xpi-utils DEBUG编写附加组件列表

1 个答案:

答案 0 :(得分:1)

请更新您的" Selenium Standalone Server jar"使用最新版本并降级你的firefox最新版本(意味着使用firefox的最低/稳定版本),这可能会对你有所帮助。