3 Replies Latest reply on Jul 9, 2013 2:08 PM by Stefan Miklosovic

    Selendroid driver for arquillian-extension-drone

    Stefan Miklosovic Novice

      Hi

       

      I am trying to bring fests to Android, we are quite far however there is always some "but" .

       

      Project changed its name to Droidium (1) where droidium-native (2) is plugged into container dynamically and installs Selendroid server APK + your application under test apk to your Android device, emulator or physical device. arquillian.xml is here (3) and basic ftest here (4).

       

      As you see from arquillian.xml, I am using just basic WebDriver with android "browserCapabilities". It works very nicely (so far) because Selendroid implements WebDriver API and installed Selendroid server at Android device is able to listen to Graphene Webdriver calls.

       

          <!-- Support for Graphene WebDriver  -->
          <extension qualifier="webdriver">
              <property name="browserCapabilities">android</property>
              <property name="remoteAddress">http://localhost:8080/wd/hub</property>
          </extension>
      
      

       

      The problem is that Selendroid implements its own "driver", to be concrete, SelendroidDriver (surprise), it is here (5) and its browser capabilities here (6)

       

      So, I was thinking, that I just implement my own driver as extension, avoiding to contribute to arquillian-extension-drone directly.

       

      The core of the problem is that SelendroidDriverFactory in my extension extends AbstractWebDriverFactory<SelendroidDriver> BUT AbstractWebDriverFactory is not made public so it can't be extended outside of the package it is placed in.

       

      Questions:

      a) It is good practice to override this problem by placing my SelendroidDriverFactory into the same package in my extension as AbstractWebDriverFactory's? (org.jboss.arquillian.drone.webdriver)

      b) Shouldn't be AbstractWebDriverFactory made public?

      c) How is one supposed to write its own driver into extension-drone then?

       

      (1) https://github.com/arquillian/arquillian-droidium

      (2) https://github.com/arquillian/arquillian-droidium/tree/master/droidium-native

      (3) https://github.com/smiklosovic/arquillian-android-container-tests/blob/master/android-container-native-test-01/src/test/resources/arquillian.xml

      (4) https://github.com/smiklosovic/arquillian-android-container-tests/blob/master/android-container-native-test-01/src/test/java/org/jboss/arquillian/android/container/test01/test/SelendroidTestAppTestCase.java

      (5) https://github.com/DominikDary/selendroid/blob/master/selendroid-client/src/main/java/io/selendroid/SelendroidDriver.java

      (6) https://github.com/DominikDary/selendroid/blob/master/selendroid-common/src/main/java/io/selendroid/SelendroidCapabilities.java

       

      Thank you