2 Replies Latest reply on Feb 1, 2015 9:31 PM by charlee_ch

    Cannot use Arquillian Graphene with Arquillian Drone

    charlee_ch

      I'm using Arquillian 1.1.6.Final for testing the JSF by using the Arquillian Drone 2.0.0.Alpha3. It works great. But when I'm adding the feature further by using the Arquillian Graphene 2.1.0.Alpha1, there is an exception as

      java.lang.NullPointerException
      at org.jboss.arquillian.graphene.enricher.WebElementEnricher.enrich(WebElementEnricher.java:68)
      at org.jboss.arquillian.graphene.enricher.GrapheneEnricher.enrich(GrapheneEnricher.java:55)
      at org.jboss.arquillian.test.impl.TestInstanceEnricher.enrich(TestInstanceEnricher.java:52)

      Even I revert the Arquillian Graphene to version 2.0.3.Final, the exception still thrown. Here is my pom.xml

      </properties>
      <dependencyManagement>
        
      <dependencies>
        
      <dependency>
        
      <groupId>org.jboss.arquillian</groupId>
        
      <artifactId>arquillian-bom</artifactId>
        
      <version>${my.arquillian.version}</version>
        
      <type>pom</type>
        
      <scope>import</scope>
        
      </dependency>
        
      <dependency>
        
      <groupId>org.jboss.arquillian.selenium</groupId>
        
      <artifactId>selenium-bom</artifactId>
        
      <version>${my.arquillian.selenium.version}</version>
        
      <type>pom</type>
        
      <scope>import</scope>
        
      </dependency>
        
      <dependency>
        
      <groupId>org.jboss.arquillian.extension</groupId>
        
      <artifactId>arquillian-drone-bom</artifactId>
        
      <version>${my.arquillian.drone.version}</version>
        
      <type>pom</type>
        
      <scope>import</scope>
        
      </dependency>
        
      </dependencies>
      </dependencyManagement>
      <dependencies>
        
      <dependency>
        
      <groupId>org.jboss.arquillian.extension</groupId>
        
      <artifactId>arquillian-drone-webdriver-depchain</artifactId>
        
      <type>pom</type>
        
      <scope>test</scope>
        
      </dependency>
        
      <dependency>
        
      <groupId>org.jboss.arquillian.graphene</groupId>
        
      <artifactId>graphene-webdriver</artifactId>
        
      <version>${my.arquillian.graphene.version}</version>
        
      <type>pom</type>
        
      <scope>test</scope>
        
      </dependency>
        
      <dependency>
        
      <groupId>org.seleniumhq.selenium</groupId>
        
      <artifactId>selenium-server</artifactId>
        
      <scope>${my.project.dependency.test.scope}</scope>
        
      <exclusions>
        
      <exclusion>
        
      <artifactId>servlet-api-2.5</artifactId>
        
      <groupId>org.mortbay.jetty</groupId>
        
      </exclusion>
        
      </exclusions>
        
      </dependency>
      </dependencies>

      My unit test is

      @RunWith(Arquillian.class)
      public class DroneTest {

        
      @Drone
        
      private WebDriver browser;

        
      @Test
        
      @RunAsClient
        
      public void ensureIndexPage() {
         
      try{
         browser
      .get("http://www.google.com")
         
      } catch (Exception e){
        e
      .printStackTrace();
         
      }
        
      }
      }

      As mention above, the unit test works fine without Arquillian Graphene. Could you please help to advise further?