Forum Discussion

poff4ik's avatar
poff4ik
Occasional Contributor
10 years ago

SoapUI and Selenium

Hi there,

 

We've faced with issues during integration of SoapUI and Selenium WD.

The root cause of issues somewhere in same jar files in SoapUI and Selenium. We are trying to workaround this jarhell but we are not succeed yet.

So what we have now:

 

Environment:

OS: Windows 8, x64

JDK: 1.8  ( JAVA_PATH linked to it )

SoapUI: 5.0.0 (Common)   and   NG Pro (Ready API NG)  trial  

( version and bits (x64/x86) doesn’t affect results)

Selenium: 2.43-2.44 and 2.39-2.42 ( see below)

( selenium-server-standalone-{version}.jar file was placed to SoapUI\bin\ext\ )

 

Groovy script:

// We can set properties webdriver.firefox.*, but that does not change result

System.setProperty("webdriver.firefox.profile", "{SomePredefinedProfile}")

System.setProperty("webdriver.firefox.bin", "{PathToFirefoxBinaryFile}")

def driver = new FirefoxDriver()

 

As soon as SoapUI ignore JAVA_HOME variable until it contains subfolder “jre”,  that subfolder was deleted/renamed. That trick allows to run SoapUI with our JDK 1.8.

 

Following libraries were replaced in ..\SoapUI...\lib\ folder ( used corresponding libraries version from selenium 2.44) :

commons-codec-1.3.jar → commons-codec-1.6.jar

commons-logging-1.1.1.jar → commons-logging-1.1.3.jar

new fluent-hc-4.3.6.jar

httpclient-4.1.1.jar → httpclient-4.3.6.jar

httpclient-cache-4.1.1.jar → httpclient-cache-4.3.6.jar

httpcore-4.1.1.jar → httpcore-4.3.3.jar

removed httpcore-nio-4.1.1.jar (this step doesn’t influence result)

httpmime-4.1.1.jar → httpmime-4.3.6.jar

 

Issues:

Selenium 2.43 & 2.44:

Browser has not been started by script. Following error was thrown immediately on “new FirefoxDriver()” command:
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Build info: version: '2.43.0', revision: '597b76b', time: '2014-09-09 20:52:14' System info: host: 'EPUAKHAW0590', ip: '10.23.11.173', os.name: 'Windows 8', os.arch: 'x86', os.version: '6.2', java.version: '1.8.0_25' Driver info: driver.version: FirefoxDriver error at line: ..

Selenium 2.39 - 2.42:

Browser has been opened from script, but “new FirefoxDriver()”command has not been competed with following exception:
org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on port 7055; process output follows: mponent returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIIdleService.removeIdleObserver] 1422545759324 addons.manager DEBUG shutdown 1422545759325 addons.manager DEBUG Calling shutdown blocker for XPIProvider 1422545759325 addons.xpi DEBUG shutdown 1422545759325 addons.xpi-utils DEBUG shutdown 1422545759326 addons.manager DEBUG Calling shutdown blocker for LightweightThemeManager 1422545759326 addons.manager DEBUG Calling shutdown blocker for OpenH264Provider 1422545759327 addons.manager DEBUG Calling shutdown blocker for PluginProvider 1422545759395 DeferredSave.extensions.json DEBUG Write succeeded 1422545759395 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 16 1422545759396 addons.xpi DEBUG Notifying XPI shutdown observers 1422545759399 addons.manager DEBUG Async provider shutdown done 1422545759799 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"] 1422545759801 addons.manager DEBUG Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"] 1422545759804 addons.xpi DEBUG startup 1422545759805 addons.xpi INFO Mappingfxdriver@googlecode.com to C:\Users\ANTON_~1\AppData\Local\Temp\anonymous1938806238924448953webdriver-profile\extensions\fxdriver@googlecode.com 1422545759806 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: C:\Users\ANTON_~1\AppData\Local\Temp\anonymous1938806238924448953webdriver-profile\extensions\webdriver-staging 1422545759807 addons.xpi INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to C:\Program Files (x86)\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd} 1422545759807 addons.xpi DEBUG Skipping unavailable install location app-system-share 1422545759807 addons.xpi DEBUG Skipping unavailable install location app-system-local

 

IntelliJ IDEA 14.0.2 works correct on the same environment + groovy 2.3.9 + auto-downloaded by maven dependencies.

 

One more unseccessfull test: Use our own java class precompiled to jar with all dependencies. We put it to …\SoapUI\Ext\. This test throws the same exceptions as clean groovy test.

6 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Is the problem Soapui is not using JAVA_HOME from system environment variable and only taking soapui's jre? or Test not inoking browser?
    • poff4ik's avatar
      poff4ik
      Occasional Contributor

      No, the issue is not about JAVA_HOME. It's reproducible for both internal and external JRE

      • nmrao's avatar
        nmrao
        Champion Level 3
        I remember reading somewhere on the net that there was some issue with the combination of browser and selenium for specific version. May be you can with the latest libraries and see if you still have problem. And make sure the libraries used placed under SOAPUI_HOME/bin/ext directory, but not under SOAPUI_HOME/ext as you mentioned.
  • Him's avatar
    Him
    Occasional Contributor

    Hey,

    I agree with your words that if we wants to work with Selenium and SoapUI we have to keep same version Jar.

    For your issue regarding launching URL after opening browser we recive a exception of 'Failed to connect to binary FirefoxBinary' that is because of firefox browser version we are using downgraded selenium jar which dose not support our leatest browser version.

    I am still looking for solution rather than downgrade firefox browser version.

    Please let me know if you find any solution for this problem.

    • poff4ik's avatar
      poff4ik
      Occasional Contributor

      Hi All,

      The solution which works for us is using specific versions of the SoapUI and Selenium.

      The combination which is works for us is

      Firefox 42.0

      Selenium 2.47.1

      ReadyAPI 1.4.1

      And do not mix 32 with 64bit versions

      Hope this helps and please list your combinations if any

      • sprice090161's avatar
        sprice090161
        Contributor

        I'm having this problem today using Chrome v62. My company auto upgrades as a policy rule to all machines on the network. I upgraded to chromedriver.exe v2.33 as documented in the release notes fro Chrome v62. my regressions fail and I have no way to get back to earlier Chrome version. I replaced the Selenium jar files but that just gives me another failure that  a google method is not found (and its not being referenced in my code by me). 

         

        I'm wondering is Ready_API 2.2 is incompatible with the latest Selenium or Chrome.

        I also have the latest Java JDK 1.8_152