无法在firefox浏览器中浏览特定的URL。我已经写了这个示例代码:
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毫秒后无法连接到端口7055上的主机127.0.0.1。Firefox控制台输出:dons.xpi DEBUG为{“ id”:“ [email protected]”,“ syncGUID”:“ {0652d9a4-3656-4279-8810-8a89767444bb}”更新XPIState,“ location”:“ winreg-app -global“,” version“:” 10.3.5.39“,” type“:” extension“,” internalName“:null,” updateURL“:null,” updateKey“:null,” optionsURL“:null,” optionsType“: null,“ aboutURL”:null,“ icons”:{},“ iconURL”:“ chrome://sp/content/common/skin/img/logo-safeprice-48.png”,“ icon64URL”:null,“ defaultLocale“:{” name“:” Avast SafePrice“,” description“:”“},” visible“:true,” active“:false,” userDisabled“:true,” appDisabled“:false,” descriptor“:” C:\ Program Files \ AVAST Software \ Avast \ SafePrice \ FF“,” installDate “:1474951630115,” updateDate“:1474951630115,” applyBackgroundUpdates“:1,” bootstrap“:true,” skinnable“:false,” size“:1877359,” sourceURI“:null,” releaseNotesURI“:null,” softDisabled“: false,“ foreignInstall”:true,“ hasBinaryComponents”:false,“ strictCompatibility”:false,“ locales”:[],“ targetApplications”:[{“ id”:“ {ec8030f7-c20a-464f-9b0e-13a3a9e97384}” ,“ minVersion”:“ 38.0a1”,“ maxVersion”:“ 43.0”}]],“ targetPlatforms”:[],“multiprocessCompatible“:false,” signedState“:2,” seen“:true} 1474957798423 DeferredSave.extensions.json DEBUG保存更改1474957798423 addons.xpi DEBUG更新数据库并更改已安装的附件1474957798424 addons.xpi-utils DEBUG更新附件关于状态1474957798425 addons.xpi-utils调试编写加载项列表
请使用最新版本更新“ Selenium Standalone Server jar”,并降级您的firefox最新版本(意味着使用firefox的最低/稳定版本),这可能会对您有所帮助。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句