Forum Discussion

UNIZETO_TECHNOL_2's avatar
UNIZETO_TECHNOL_2
Occasional Contributor
11 years ago

SoapUI Pro 5.1.2 & Selenium 2.44.0

Hi.

A am having a problem integrating Selenium 2.44.0 within SoapUI Pro (5.1.2 and NG). Previous versions of Selenium (2.41) work fine.

My selenium code is written inside the SetupScript for the testCase and in groovy script test steps.

The jars selenium-server-standalone-2.44.0.jar (with dependencies in it) and selenium-java-2.44.0.jar are inside my bin/ext folder and soapui is started through the .bat file.

When i'm trying to invoke the firefoxFriver


WebDriver driver;
driver = new FirefoxDriver();


i get the following error:
TestCase failed [java.lang.NoClassDefFoundError: Could not initialize class org.apache.http.impl.conn.ManagedHttpClientConnectionFactory:java.lang.NoClassDefFoundError: Could not initialize class org.apache.http.impl.conn.ManagedHttpClientConnectionFactory], time taken = 0


Everything works just fine from eclipse.

I think it has something to do with classpath resolving.
SoapUI has classes in the lib folder, which are older than the selenium versions.

Does SoapUI pass the lib folder classes over those in the bin/ext folder ?

Selenium 2.44 is provided with the new httpClient package (4.3.4), while SoapUI has this package in the 4.1.1 version. The ManagedHttpClientConnectionFactory is a class found in the newer version.

BTW. I think you should consider integrating selenium with SoapUI (by adding a new kind of TestStep perhaps), to enhance SoapUI with visual Web App Testing capabilities.

5 Replies

  • Hi,


    Does SoapUI pass the lib folder classes over those in the bin/ext folder ?


    Yes, if you check the classpath in Help -> System properties I believe the <SoapUI Pro install>\lib directory comes before <SoapUI Pro install>\bin\ext directory. You will need to copy the 4.3.4 jar file over the 4.1.1 jar file in the <SoapUI Pro install>\lib directory and restart SoapUI Pro. However, replacing the http client with a newer jar file could make SoapUI Pro not functional as there could be lots of differences between those versions.


    Regards,
    Marcus
    SmartBear Support
    • mohan191289's avatar
      mohan191289
      New Contributor

      Hi,

       

      Do we have any update or workaround for handling this issue?

       

      Thank You!

      • nmrao's avatar
        nmrao
        Icon for Champion Level 1 rankChampion Level 1
        Have you tried what Marcus had replied? Please add more details?