Webdriver binaries in Drone and selenium 3


#1

Hi everyone,

I started using drone with selenium 3, here is maven dependencies of interest:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.jboss.arquillian.selenium</groupId>
            <artifactId>selenium-bom</artifactId>
            <version>3.0.1</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.arquillian</groupId>
            <artifactId>arquillian-universe</artifactId>
            <version>1.0.0.Alpha5</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
</dependencyManagement>
    <dependency>
        <groupId>org.arquillian.universe</groupId>
        <artifactId>arquillian-graphene</artifactId>
        <scope>test</scope>
        <type>pom</type>
    </dependency>

    <dependency>
        <groupId>io.github.bonigarcia</groupId>
        <artifactId>webdrivermanager</artifactId>
        <version>1.5.1</version>
        <scope>test</scope>
    </dependency>

I am using webdrivermanager to download binaries automatically and export environment variables needed by Selenium but for that I need to setup webdrivers in BeforeClass:

@BeforeClass
public static void setup() {
    boolean travis = System.getProperty("travisci") != null;
    if (travis) {
        return;
    }
    //for selenium 3 we must setup the webdriverusing driver manager (it will download webdrivers to /tmp)
   
    FirefoxDriverManager.getInstance().setup();
    ChromeDriverManager.getInstance().setup();
    InternetExplorerDriverManager.getInstance().setup();
   //PhantomJsDriverManager.getInstance().setup();//no need because its automatically setup by arquillian
    //EdgeDriverManager.getInstance().setup(); //not supported by arquillian at the moment
}

As I don’t know which webdriver is going to be used I setup all of them, it would be nice if Arquillian could do this based on browser property from arquillian.xml.

What do you think? What are you using to setup webdriver binaries in selenium 3?
Note that I’m looking for something automatic without needing to download drivers binaries manually.


#2

Hi,

we’ve got our own implementation of automatic downloads, see here: https://github.com/arquillian/arquillian-extension-drone/#automatic-download
however, this is a part of a new version of Drone that hasn’t been released yet. If you are interested in this new feature and the set of the supported browsers are sufficient for you, then we can release an Alpha release of a new version of Drone.

Matous


#3

Hi @mjobanek, yes I’m interested! thank you :thumbsup:


#4

I’ve released Drone 2.1.0.Alpha1 a few minutes ago, so probably tomorrow it should be on Maven central.
Check it tomorrow and try it out when it is there. I’m looking forward to your feedback…


#5

Hi @mjobanek , this is working flawless here with 2.1.0.Alpha1, thank you and keep the great work!

INFO: Initialized Spacelift from defaults, workspace: /home/PROCERGS.REDERS/rafael-pestano/projetos/admin-showcase, cache: /home/PROCERGS.REDERS/rafael-pestano/.spacelift/cache
Drone: downloading chromedriver_linux64.zip from https://chromedriver.storage.googleapis.com/2.27/chromedriver_linux64.zip to /home/PROCERGS.REDERS/rafael-pestano/.arquillian/drone/chrome/2.27/chromedriver_linux64.zip 
....................................
jan 27, 2017 8:01:52 AM org.jboss.arquillian.drone.webdriver.binary.BinaryFilesUtils extract

For the ones using current arq-universe (alpha5), here’s maven dependencies:

   <dependency>
        <groupId>org.arquillian.universe</groupId>
        <artifactId>arquillian-graphene</artifactId>
        <scope>test</scope>
        <type>pom</type>
        <exclusions>
            <exclusion>
                <groupId>org.arquillian.universe</groupId>
                <artifactId>arquillian-drone</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>org.jboss.arquillian.extension</groupId>
        <artifactId>arquillian-drone-webdriver-depchain</artifactId>
        <version>2.1.0.Alpha1</version>
        <scope>test</scope>
        <type>pom</type>
    </dependency>