FF 48 Selenium webdriver - 2.53.1 - org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
OS: OSX Selenium Version: 2.53.1 Browser: Firefox
It's just launching a blank ff screen and the extension being added gets deleted.
Test is to actually have the extension to be added to the FF toolbar.
Code snippet 👍
public static final String firefoxExtension = "/Downloads/toolbar-staging-latest.xpi";
public static void getEnvironmentInfo() throws IOException {
LOGGER.info(("Current Operating System: " + operatingSystem));
LOGGER.info("Current Architecture: " + systemArchitecture);
LOGGER.info("Current Browser Selection: " + CONFIG.getProperty("Browser"));
}
public static void initialize() throws IOException {
System.out.println("value of driver"+driver);
System.out.println("Intialize method in Abstract");
CONFIG = new Properties();
LOGGER.info(System.getProperty("user.dir"));
FileInputStream fp = new FileInputStream(System.getProperty("user.dir") + "/src/config.properties");
CONFIG.load(fp);
if (CONFIG.getProperty("Browser").equalsIgnoreCase("firefox") ){
File file = new File(firefoxExtension);
FirefoxProfile firefoxProfile = new FirefoxProfile();
firefoxProfile.addExtension(file);
firefoxProfile.setPreference("extensions.Mon Alerte Shoop.currentVersion", "1.1.4");
System.setProperty("webdriver.firefox.bin","/Applications/Firefox.app/Contents/MacOS/firefox-bin");
// Avoid startup screen
// WebDriver driver = new FirefoxDriver(firefoxProfile); // DesiredCapabilities dc = new DesiredCapabilities(firefoxProfile); driver = new FirefoxDriver(firefoxProfile); Utility.setWindowMaximise(driver);
} else { if (CONFIG.getProperty("Browser").equalsIgnoreCase("chrome")) { DesiredCapabilities dc = new DesiredCapabilities(); if (operatingSystem.contains("WINDOWS")) { System.setProperty("webdriver.chrome.driver",chromeWindowsdriver); } else if (operatingSystem.contains("MAC")) { System.setProperty("webdriver.chrome.driver",chromeMacdriver); } else if (operatingSystem.contains("LINUX")) { System.setProperty("webdriver.chrome.driver",chromeLinuxdriver); }else if (operatingSystem.contains("Centos")) { System.setProperty("webdriver.chrome.driver",chromeCentosdriver); //System.setProperty("webdriver.chrome.driver",chromeExtention); } System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir")+ chromeLinuxdriver); System.setProperty("webdriver.chrome.chrome-extension", chromeExtension); ChromeOptions options = new ChromeOptions();
options.addExtensions (new File(chromeExtension));
dc.setCapability(ChromeOptions.CAPABILITY, options);
driver = new ChromeDriver(dc);
Utility.setWindowMaximise(driver);
}
}
}
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
8-4474-a285-3208198ce6fd}","syncGUID":"cjTT2Ycm32V5","location":"app-global","version":"48.0","type":"theme","internalName":"classic/1.0","updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{"32":"icon.png","48":"icon.png"},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Default","description":"The default theme.","creator":"Mozilla","homepageURL":null,"contributors":["Mozilla Contributors"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"/Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","installDate":1470754250000,"updateDate":1470754250000,"applyBackgroundUpdates":1,"skinnable":true,"size":7134,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"48.0","maxVersion":"48.0"}],"targetPlatforms":[],"seen":true}
1471446838988 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1471446838989 DeferredSave.extensions.json DEBUG Save changes
1471446838989 addons.xpi DEBUG Updating database with changes to installed add-ons
1471446838989 addons.xpi-utils DEBUG Updating add-on states
1471446838991 addons.xpi-utils DEBUG Writing add-ons list
1471446838992 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1471446838993 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.0
1471446838993 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1471446838993 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.0.4
1471446838994 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1471446838994 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.4.3
1471446839013 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1471446839013 addons.manager DEBUG Provider finished startup: XPIProvider
1471446839013 addons.manager DEBUG Starting provider: LightweightThemeManager
1471446839013 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1471446839013 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1471446839014 addons.manager DEBUG Starting provider: GMPProvider
1471446839018 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1471446839018 addons.manager DEBUG Provider finished startup: GMPProvider
1471446839018 addons.manager DEBUG Starting provider: PluginProvider
1471446839019 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1471446839019 addons.manager DEBUG Provider finished startup: PluginProvider
1471446839019 addons.manager DEBUG Completed startup sequence
1471446839290 addons.manager DEBUG Starting provider:
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:113)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:271)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:119)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:216)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:207)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:124)
at com.maple.shoop.config.AbstractDriver.initialize(AbstractDriver.java:67)
at com.maple.shoop.Runner.ToolbarExtensionLoginRunner.setUp(ToolbarExtensionLoginRunner.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.api.junit.Cucumber.run(Cucumber.java:98)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Aug 17, 2016 4:14:43 PM com.maple.shoop.Runner.ToolbarExtensionLoginRunner tearDown INFO: Quiting browser
org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/Applications/Firefox.app/Contents/MacOS/firefox-bin) on port 7055; process output follows:
8-4474-a285-3208198ce6fd}","syncGUID":"cjTT2Ycm32V5","location":"app-global","version":"48.0","type":"theme","internalName":"classic/1.0","updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{"32":"icon.png","48":"icon.png"},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Default","description":"The default theme.","creator":"Mozilla","homepageURL":null,"contributors":["Mozilla Contributors"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"/Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","installDate":1470754250000,"updateDate":1470754250000,"applyBackgroundUpdates":1,"skinnable":true,"size":7134,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"48.0","maxVersion":"48.0"}],"targetPlatforms":[],"seen":true}
1471446838988 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1471446838989 DeferredSave.extensions.json DEBUG Save changes
1471446838989 addons.xpi DEBUG Updating database with changes to installed add-ons
1471446838989 addons.xpi-utils DEBUG Updating add-on states
1471446838991 addons.xpi-utils DEBUG Writing add-ons list
1471446838992 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1471446838993 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.0
1471446838993 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1471446838993 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.0.4
1471446838994 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1471446838994 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.4.3
1471446839013 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1471446839013 addons.manager DEBUG Provider finished startup: XPIProvider
1471446839013 addons.manager DEBUG Starting provider: LightweightThemeManager
1471446839013 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1471446839013 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1471446839014 addons.manager DEBUG Starting provider: GMPProvider
1471446839018 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1471446839018 addons.manager DEBUG Provider finished startup: GMPProvider
1471446839018 addons.manager DEBUG Starting provider: PluginProvider
1471446839019 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1471446839019 addons.manager DEBUG Provider finished startup: PluginProvider
1471446839019 addons.manager DEBUG Completed startup sequence
1471446839290 addons.manager DEBUG Starting provider:
Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09' System info: host: 'Lon-Quid-ML-82.local', ip: '192.168.227.134', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_91' Driver info: driver.version: AbstractDriver
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:125)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:271)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:119)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:216)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:207)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:124)
at com.maple.shoop.config.AbstractDriver.initialize(AbstractDriver.java:67)
at com.maple.shoop.Runner.ToolbarExtensionLoginRunner.setUp(ToolbarExtensionLoginRunner.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.api.junit.Cucumber.run(Cucumber.java:98)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
8-4474-a285-3208198ce6fd}","syncGUID":"cjTT2Ycm32V5","location":"app-global","version":"48.0","type":"theme","internalName":"classic/1.0","updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{"32":"icon.png","48":"icon.png"},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Default","description":"The default theme.","creator":"Mozilla","homepageURL":null,"contributors":["Mozilla Contributors"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"/Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","installDate":1470754250000,"updateDate":1470754250000,"applyBackgroundUpdates":1,"skinnable":true,"size":7134,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"48.0","maxVersion":"48.0"}],"targetPlatforms":[],"seen":true}
1471446838988 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1471446838989 DeferredSave.extensions.json DEBUG Save changes
1471446838989 addons.xpi DEBUG Updating database with changes to installed add-ons
1471446838989 addons.xpi-utils DEBUG Updating add-on states
1471446838991 addons.xpi-utils DEBUG Writing add-ons list
1471446838992 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1471446838993 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.0
1471446838993 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1471446838993 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.0.4
1471446838994 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1471446838994 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.4.3
1471446839013 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1471446839013 addons.manager DEBUG Provider finished startup: XPIProvider
1471446839013 addons.manager DEBUG Starting provider: LightweightThemeManager
1471446839013 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1471446839013 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1471446839014 addons.manager DEBUG Starting provider: GMPProvider
1471446839018 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1471446839018 addons.manager DEBUG Provider finished startup: GMPProvider
1471446839018 addons.manager DEBUG Starting provider: PluginProvider
1471446839019 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1471446839019 addons.manager DEBUG Provider finished startup: PluginProvider
1471446839019 addons.manager DEBUG Completed startup sequence
1471446839290 addons.manager DEBUG Starting provider:
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:113)
... 29 more
It's really hard to read this stack trace but it looks like you aren't setting Marionette to true. Extension signing was added in Firefox 48 so you will need to use Marionette there and have your extension signed as well otherwise things wont work.