Forum Discussion

gkpandi's avatar
gkpandi
Occasional Contributor
5 years ago

Work SoapUI Free Version with Selenium WebDriver

Hi,

I'm trying to integrate Selenium Webdriver with SoapUI tool as in my project, there is a test case like need to run a webservice from SoapUI and then get a "zipcode" from the response and it should be passed to the GUI to fetch the list of matched customers.

 

SoapUI Version : 5.3.0 free version

Selenium WebDriver : 3.4.0

ChromeDriver: 2.46

Java Version: 1.8

 

I have tried with different versions of Selenium and related dependant JARs but not able to run the selenium script. Here's the sample script executed via Groovy Script test step and throwing the below error message.

 

Sample Selenium script:

 

import java.lang.*;
import org.openqa.selenium.*;
import org.openqa.selenium.chrome.*;

launchBrowser()

public void launchBrowser()
{
	System.setProperty("webdriver.chrome.driver", "D:\\SoapUI-5.3.0\\bin\\ext\\chromedriver.exe");
	WebDriver driver = new ChromeDriver();
	driver.get("https://www.google.com");
	log.info("Browser launched successfully.");
}

 

ERROR:java.lang.NoSuchMethodError: org.openqa.selenium.os.CommandLine.findExecutable(Ljava/lang/String;)Ljava/lang/String;
java.lang.NoSuchMethodError: org.openqa.selenium.os.CommandLine.findExecutable(Ljava/lang/String;)Ljava/lang/String; 
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:84)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:87)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:186)
at Script1.launchBrowser(Script1.groovy:10)
at Script1.run(Script1.groovy:5)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:90)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:141)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:250)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Anyone guide me what would be the reason or any dependencies missing?

 

Thanks,

Karunagara Pandi G

No RepliesBe the first to reply