无法使用 Arquillian Drone 连接到 Firefox
Unable to connect to Firefox using Arquillian Drone
我正在关注位于 here 的文档。我的目标是将 Drone 集成到我的客户端测试中。
这是我的代码示例:
@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);
}
当我 运行 我的 Arquillain 测试时,firefox window 确实打开了,但它只是停在那里。一段时间后,我的测试超时,并给我以下混乱:
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
我在 Firefox 32 和 45 上试过,结果相同。我对selenium的依赖结构如下:
selenium-firefox-驱动程序:2.29.0
selenium-remote-driver: 2.29.0
arquillian-drone-webdriver-depchain:1.1.1.Final
我在这里错过了什么?
Firefox 32、45 已经很老了。
您似乎指的是关于 Arquillian Drone 的一些旧文档。
检查这个新文档 - http://arquillian.org/arquillian-extension-drone/
检查我的 pom,它工作得很好,并相应地调整你的。
<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>
我正在关注位于 here 的文档。我的目标是将 Drone 集成到我的客户端测试中。
这是我的代码示例:
@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);
}
当我 运行 我的 Arquillain 测试时,firefox window 确实打开了,但它只是停在那里。一段时间后,我的测试超时,并给我以下混乱:
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
我在 Firefox 32 和 45 上试过,结果相同。我对selenium的依赖结构如下:
selenium-firefox-驱动程序:2.29.0
selenium-remote-driver: 2.29.0
arquillian-drone-webdriver-depchain:1.1.1.Final
我在这里错过了什么?
Firefox 32、45 已经很老了。
您似乎指的是关于 Arquillian Drone 的一些旧文档。
检查这个新文档 - http://arquillian.org/arquillian-extension-drone/
检查我的 pom,它工作得很好,并相应地调整你的。
<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>