2
votes

I am following the documentation located here. My goal is to integrate Drone into my client tests.

Here is an example of my code:

@Test
@RunAsClient
public void testSomething(@Drone final FirefoxDriver driver) throws Exception {
    final String url = "www.google.com";
    System.out.println("### the endpoint is :: " + url);

    driver.get(url);
    driver.wait(5000);
    final String pageSource = driver.getPageSource();
    System.out.println("### source is :: " + pageSource);

}

When I run my Arquillain tests, a firefox window does open, but it just sits there. After some time, my test times out, and gives me the following mess:

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
*** Blocklist::_preloadBlocklistFile: blocklist is disabled
JavaScript error: chrome://browser/content/urlbarBindings.xml, line 677: aUrl is undefined
JavaScript error: chrome://browser/content/urlbarBindings.xml, line 677: aUrl is undefined

I tried this on Firefox 32 and 45, with the same result. My dependency structure for selenium is as follows:

selenium-firefox-driver: 2.29.0

selenium-remote-driver: 2.29.0

arquillian-drone-webdriver-depchain:1.1.1.Final

What am I missing here?

1

1 Answers

3
votes

Firefox 32, 45 are very old.

You seem to be referring to some old doc on Arquillian Drone.

Check this new documentation - http://arquillian.org/arquillian-extension-drone/

Check my pom which works great and adjust yours accordingly.

<properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <version.org.jboss.arquillian>1.1.12.Final</version.org.jboss.arquillian>
        <version.org.jboss.arquillian.drone>2.1.0.Alpha2</version.org.jboss.arquillian.drone>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.jboss.arquillian.graphene</groupId>
            <artifactId>graphene-webdriver</artifactId>
            <version>2.2.0</version>
            <type>pom</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.10</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.testng</groupId>
            <artifactId>arquillian-testng-standalone</artifactId>
            <version>1.1.13.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-api</artifactId>
            <version>3.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-support</artifactId>
            <version>3.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.extension</groupId>
            <artifactId>arquillian-drone-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.graphene</groupId>
            <artifactId>graphene-webdriver-api</artifactId>
            <version>2.2.0</version>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <!-- Arquillian Core dependencies -->
            <dependency>
                <groupId>org.jboss.arquillian</groupId>
                <artifactId>arquillian-bom</artifactId>
                <version>${version.org.jboss.arquillian}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- Arquillian Drone dependencies and WebDriver/Selenium dependencies -->
            <dependency>
                <groupId>org.jboss.arquillian.extension</groupId>
                <artifactId>arquillian-drone-bom</artifactId>
                <version>${version.org.jboss.arquillian.drone}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>