I have a gs that works fine when i run manually in windows, but when i run from centos i get this most irritating message
here is my code
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.support.ui.Select;
import org.openqa.selenium.Keys;
import org.openqa.selenium.remote.DesiredCapabilities;
path = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "driverPath" )
drive= com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "driver" )
fpath= path+drive
System.setProperty('webdriver.chrome.driver',fpath)
url = "https://www.google.com"
ProxySelector proxy = ProxySelector.getDefault()
ProxySelector.setDefault(proxy)
ChromeOptions chromeOptions = new ChromeOptions()
chromeOptions.addArguments("--headless")
chromeOptions.addArguments("--window-size=1024x768")
WebDriver driver = new ChromeDriver(chromeOptions)
WebDriverWait wait = new WebDriverWait(driver,30)
driver.manage().window().maximize()
driver.get(url)
driver.findElement(By.xpath("//input[@title='Search']")).sendKeys("hello")
driver.findElement(By.xpath("//input[@value='Google Search']")).click()
driver.close()
driver.quit()
return;
I run it the following way
./testrunner.sh -G driver=chromedriver -G driverPath=/opt/drivers/ -G capturePath=/opt/captures/ -s Regression -c "Open Google" /opt/projects/opengoogle.xml
I have even added this in the .vmoptions file
-Dsoapui.browser.disabled=true
But yet i am still getting
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:573)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:181)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:168)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:157)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
at Script1.run(Script1.groovy:27)
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.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:211)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:138)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:46)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:128)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:76)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:594)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:573)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:405)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:202)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:137)
at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:112)
at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:122)
Caused by: java.lang.NullPointerException: proxySelector == null
at okhttp3.Address.<init>(Address.java:79)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.createAddress(RetryAndFollowUpInterceptor.java:206)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
at okhttp3.RealCall.execute(RealCall.java:77)
at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:103)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:102)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
... 30 more
How does one either disable this proxy call, or make it not null. I see a few people are having the same issue. I'm using the right versions according to maven repo
17:55:20,663 INFO [SoapUI] Adding [/SmartBear/SoapUI-5.4.0/bin/ext/selenium-server-standalone-3.141.5.jar] to extensions classpath
17:55:20,664 INFO [SoapUI] Adding [/SmartBear/SoapUI-5.4.0/bin/ext/postgresql-42.2.2.jar] to extensions classpath
17:55:20,664 INFO [SoapUI] Adding [/SmartBear/SoapUI-5.4.0/bin/ext/client-combined-3.141.5.jar] to extensions classpath
17:55:20,664 INFO [SoapUI] Adding [/SmartBear/SoapUI-5.4.0/bin/ext/client-combined-3.141.5-sources.jar] to extensions classpath
17:55:20,664 INFO [SoapUI] Adding [/SmartBear/SoapUI-5.4.0/bin/ext/byte-buddy-1.8.15.jar] to extensions classpath
17:55:20,665 INFO [SoapUI] Adding [/SmartBear/SoapUI-5.4.0/bin/ext/okhttp-3.11.0.jar] to extensions classpath
17:55:20,665 INFO [SoapUI] Adding [/SmartBear/SoapUI-5.4.0/bin/ext/okio-1.14.0.jar] to extensions classpath
Note guava-25.0-jre.jar is in the lib directory not the ext
PRETTY please can you tell me how to get this working?
thanks