Drone DesiredCapabilities issues
jwatts Dec 30, 2012 11:48 PMHello,
I'm having issue running Drone Webdriver
I have a Struts2 web app that I'm attempting to test with arquillian with the drone extension, when I run my test I recieved this exception:
java.lang.NullPointerException at org.openqa.selenium.remote.DesiredCapabilities.<init>(DesiredCapabilities.java:51)
I debuged the arquillian-drone-webdriver.jar; inside the TypedWebDriverConfiguration.java at getCapabilities() method, a new DesiredCapabilities class is created with TypedWebDriverConfiguration.this.capabilityMap, however the capabilityMap is never instaniated hence the NPE. I instaniated and hard-coded some values for capabilityMap:
TypedWebDriverConfiguration.this.capabilityMap = new HashMap<String, String>();
TypedWebDriverConfiguration.this.capabilityMap.put("browserName", "chrome");
TypedWebDriverConfiguration.this.capabilityMap.put("platform", "WINDOWS");
recompile and rerun and everything works as expected...struts.war is deployed, browser comes and selenium executes.
I'm not sure if this is a bug or I'm missing something in my arquillian.xml configuration or something.
my pom.xml is exactly as https://github.com/arquillian/arquillian-extension-drone so should not be any version issues as reported in http://stackoverflow.com/questions/12030946/how-to-configure-webdriver-with-arquillian-using-the-capabilities-interface
here's my arquillian.xml
<?xml version="1.0" encoding="UTF-8"?>
<arquillian xmlns="http://jboss.org/schema/arquillian"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<engine>
<property name="deploymentExportPath">.</property>
</engine>
<container qualifier="dev" default="true">
<configuration>
<property name="jbossHome">installs/jboss/jboss-as-7.1.0.Final</property>
<property name="allowConnectingToRunningServer">true</property>
<property name="javaVmArguments">-Djboss.modules.system.pkgs=com.sun.tools.attach,org.jboss.byteman -Xbootclasspath/a:lib/jboss/byteMan/lib/tools.jar</property>
<property name="outputToConsole">true</property>
</configuration>
</container>
<extension qualifier="webdriver">
<property name="browserCapabilities">chrome</property>
<property name="chromeDriverBinary">lib/chromedriver/chromedriver.exe</property>
<property name="chromeBinary">lib/chromedriver/chromedriver.exe</property>
</extension>
<extension qualifier="byteman">
<property name="autoInstallAgent">true</property>
<property name="agentProperties">org.jboss.byteman.verbose=true</property>
</extension>
</arquillian>
Any additional insight would be greatly appreciated, Thanks