Xat
Xat

Reputation: 137

Firefox 55/54 browser throws exception OR does not returns back the control to selenium code for maven project after initialization in Windows-7 x64

I have set up an ANT project to write my UI automation framework using Selenium 3.4.0. I am using Gecko driver v18.0 for supporting latest FF browser v55. java version I am using is 1.8. This project initializes the FF browser with "desired capabilities" object and completes the test. IDE used for this project is Eclipse (Enide 2015). The unit testing framework here is TestNG.

I tried to replicate the same in a maven project using 3.4.0 selenium & Gecko driver v18.0. IDE I am using is IntelliJ. But here after the code executes the driver-initialize part, the browser window opens and then the control never comes back to selenium. The browser remains open for 10-15 min & process keeps running in the background. I have to stop the run to come out of it. Unit testing framework for Maven project here JBehave.

So I did few hit and trails to see the compatibility between Selenium and Gecko driver for Firefox:

  1. Selenium 3.4.0 | Firefox v55 | Gecko Driver version - v15 for 32/64 bit |

Result: After Initializing FF browser, control does not return back to Selenium.

  1. Selenium 3.4.0 | Firefox v55 | Gecko Driver version - v16 for 32/64 bit |

Result: org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{moz:firefoxOptions={binary=Optional.empty, args=[], legacy=false, logLevel=null, prefs={}, profile=null}}], required capabilities = Capabilities [{}] Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' System info: host: 'XXXXX', ip: 'xxx.xxx.xx.xx', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_45' Driver info: driver.version: FirefoxDriver

  1. Selenium 3.5.1 | Firefox v55 | Gecko Driver version - v15-v19 for 32/64 bit |

Result: org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{moz:firefoxOptions={binary=Optional.empty, args=[], legacy=false, logLevel=null, prefs={}, profile=null}}], required capabilities = Capabilities [{}] Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' System info: host: 'XXXXX', ip: 'xxx.xxx.xx.xx', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_45' Driver info: driver.version: FirefoxDriver

  1. Selenium 2.53.1 | Firefox v55 | Gecko Driver version - v15 for 32/64 bit |

Result: WebDriverException: Failed to connect to binary FirefoxBinary(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on port 7055

  1. Selenium 2.53.1 | Chrome |

Result: Test code executed successfully.

  1. Selenium 3.5.1 | Firefox v54 | Gecko Driver version - v16 for 32/64 bit |

Result: org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{moz:firefoxOptions={binary=Optional.empty, args=[], legacy=false, logLevel=null, prefs={}, profile=null}}], required capabilities = Capabilities [{}] Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' System info: host: 'XXXXX', ip: 'xxx.xxx.xx.xx', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_45' Driver info: driver.version: FirefoxDriver

I have read through most links mentioned below but it did not help-

  1. Selenium 3.4.0 with Firefox 55
  2. https://seleniumhq.wordpress.com/2017/08/09/firefox-55-and-selenium-ide/
  3. Selenium 3.0 Firefx Driver fails with org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session
  4. Unable to create new remote session - Selenium webdriver
  5. https://github.com/mozilla/geckodriver/issues/749
  6. https://github.com/SeleniumHQ/selenium/issues/3630

For the first entry above (...which is Selenium 3.4.0, Firefox v55 and Gecko drover v15 for 32/64 bit windows), when I did Ctrl+Shift+J I got the below log-

1505982873005 addons.xpi WARN Error parsing extensions state: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [amIAddonManagerStartup.readStartupData]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: resource://gre/modules/addons/XPIProvider.jsm :: loadExtensionState :: line 1596" data: no] Stack trace:

loadExtensionState()@resource://gre/modules/addons/XPIProvider.jsm:1596 < getInstallState()@resource://gre/modules/addons/XPIProvider.jsm:1631 < checkForChanges()@resource://gre/modules/addons/XPIProvider.jsm:3152 < startup()@resource://gre/modules/addons/XPIProvider.jsm:2246 < callProvider()@resource://gre/modules/AddonManager.jsm:271 < _startProvider()@resource://gre/modules/AddonManager.jsm:741 < startup()@resource://gre/modules/AddonManager.jsm:908 < startup()@resource://gre/modules/AddonManager.jsm:3122 < observe()@jar:file:///C:/Program%20Files%20(x86)/Mozilla%20Firefox/omni.ja!/components/addonManager.js:65

While creating services from category 'profile-after-change', service for entry 'Notification Telemetry Service', contract ID '@mozilla.org/notificationTelemetryService;1' does not implement nsIObserver. Warning: unrecognized command line flag --marionette nsBrowserContentHandler.js:726 PAC file installed from http://autocache.hpecorp.net/ Property contained reference to invalid variable. Error in parsing value for ‘color’. Falling back to ‘inherit’. browser.css:251:7560 DEPRECATION WARNING: Search service falling back to synchronous initialization. This is generally the consequence of an add-on using a deprecated search service API.

My target is to use this framework for UI testing against the latest stable version of IE, Chrome & Firefox browser. Any help in this regard will be helpful.

Upvotes: 0

Views: 477

Answers (1)

Iidwuurliik
Iidwuurliik

Reputation: 1

I am having exactly same issue on MAC osx , I have been looking for solution for a couple of days 508672244107 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "-profile" "/var/folders/0k/gv7bgjzs157b0mydntwdqj840000gy/T/rust_mozprofile.hixndTibKloe" 1508672244363 addons.xpi WARN Error parsing extensions state: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [amIAddonManagerStartup.readStartupData]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: resource://gre/modules/addons/XPIProvider.jsm :: loadExtensionState :: line 1554" data: no] Stack trace: loadExtensionState()@resource://gre/modules/addons/XPIProvider.jsm:1554 < getInstallState()@resource://gre/modules/addons/XPIProvider.jsm:1589 < checkForChanges()@resource://gre/modules/addons/XPIProvider.jsm:3109 < startup()@resource://gre/modules/addons/XPIProvider.jsm:2188 < callProvider()@resource://gre/modules/AddonManager.jsm:269 < _startProvider()@resource://gre/modules/AddonManager.jsm:739 < startup()@resource://gre/modules/AddonManager.jsm:906 < startup()@resource://gre/modules/AddonManager.jsm:3090 < observe()@jar:file:///Applications/Firefox.app/Contents/Resources/omni.ja!/components/addonManager.js:65 1508672244714 Marionette INFO Enabled via --marionette 2017-10-22 14:37:25.560 plugin-container[2720:62009] * CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xad3f, name = 'com.apple.tsm.portname' See /usr/include/servers/bootstrap_defs.h for the error codes. 2017-10-22 14:37:25.560 plugin-container[2720:62009] * CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x560b, name = 'com.apple.CFPasteboardClient' See /usr/include/servers/bootstrap_defs.h for the error codes. 2017-10-22 14:37:25.560 plugin-container[2720:62009] void __CFPasteboardSetup() : Failed to allocate communication port for com.apple.CFPasteboardClient; this is likely due to sandbox restrictions 1508672245808 Marionette INFO Listening on port 57372 1508672245923 Marionette DEBUG Register listener.js for window 2147483649 INFO 10/22 11:37:25 o.o.s.r.ProtocolHan~ - Falling back to original OSS JSON Wire Protocol. INFO 10/22 11:37:25 o.o.s.r.ProtocolHan~ - Falling back to straight W3C remote end connection 22Oct2017 14:37:26,364 [INFO] TestCycle.initializeWebDriver - Error initializining: Unable to create new remote session. desired capabilities = Capabilities [{marionette=true, firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@67c2e933, browserName=firefox, moz:firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@67c2e933, version=, platform=ANY}], required capabilities = Capabilities [{}] Build info: version: '3.0.0', revision: '350cf60', time: '2016-10-13 10:48:57 -0700' System info: host: 'tlv-mpp6a', ip: '172.29.53.33', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_121' Driver info: driver.version: FirefoxDriver

Upvotes: 0

Related Questions