Format for setting proxy in arquillian.xml
gerdemb Oct 11, 2017 12:03 AMI am struggling to set the proxy for my WebDriver instances in arquillian.xml. I believe that I should be able to do something like the following:
<extension qualifier="webdriver"> <property name="proxy">{"proxyType":"manual","httpProxy":"1.2.3.4:1234","sslProxy":"1.2.3.4:1234"}</property> </extension>
but I always get a RuntimeException. When I remove the proxy setting from arquillian.xml, everything works normally. Can someone advise if this should work and what the correct format should be? Thank you!
pom.xml
<dependency> <groupId>org.jboss.arquillian</groupId> <artifactId>arquillian-bom</artifactId> <version>1.1.13.Final</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.extension</groupId> <artifactId>arquillian-drone-bom</artifactId> <version>2.4.2</version> <type>pom</type> <scope>import</scope> </dependency>
java.lang.RuntimeException: Unable to instantiate Drone via org.openqa.selenium.firefox.FirefoxDriver(Capabilities): 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: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z' System info: host: 'P35918', ip: 'fe80:0:0:0:a65e:60ff:fecd:b0b%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_144' Driver info: driver.version: FirefoxDriver at com.google.gson.JsonObject.getAsJsonObject(JsonObject.java:191) at org.openqa.selenium.remote.ProtocolHandshake.lambda$streamW3CProtocolParameters$23(ProtocolHandshake.java:313) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419) at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:742) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at org.openqa.selenium.remote.ProtocolHandshake.streamW3CProtocolParameters(ProtocolHandshake.java:311) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:255) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:237) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:138) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:191) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:103) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:137) 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.jboss.arquillian.drone.webdriver.factory.SecurityActions.newInstance(SecurityActions.java:144) at org.jboss.arquillian.drone.webdriver.factory.FirefoxDriverFactory.createInstance(FirefoxDriverFactory.java:76) at org.jboss.arquillian.drone.webdriver.factory.FirefoxDriverFactory.createInstance(FirefoxDriverFactory.java:40) at org.jboss.arquillian.drone.webdriver.factory.WebDriverFactory.createInstance(WebDriverFactory.java:127) at org.jboss.arquillian.drone.webdriver.factory.WebDriverFactory.createInstance(WebDriverFactory.java:38) at org.jboss.arquillian.drone.impl.DroneConfigurator$1.createInstance(DroneConfigurator.java:112) at org.jboss.arquillian.drone.impl.CachingCallableImpl.call(CachingCallableImpl.java:44) at org.jboss.arquillian.core.impl.threading.ThreadedExecutorService$ContextualCallable.call(ThreadedExecutorService.java:89) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)