2
我試圖用硒Maven的插件才能使用phantomjs司機從遙控器測試使用的角色樞紐Maven來運行硒服務器,到目前爲止我的插件配置是非常簡單的:運行硒樞紐行家
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>start-selenium</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
<configuration>
<background>true</background>
</configuration>
</execution>
<execution>
<id>stop-seleniump</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop-server</goal>
</goals>
</execution>
</executions>
</plugin>
然後我使用maven執行插件鉤phantomjs:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>pre-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>phantomjs</executable>
<arguments>
<argument>--webdriver=8080</argument>
<argument>--webdriver-selenium-grid-hub=http://localhost:4444</argument>
</arguments>
</configuration>
</plugin>
利用這種結構的輸出是:HTTP ERROR: 403 Forbidden for Proxy
,我不能再往前走。任何人都已成功配置此?
我決定採取不同的方法來運行phantomjs的硒測試。但是,如果有人能夠回答這個問題,那將是非常酷的,因爲我認爲這可能是一種更有效的處理集成測試的優雅方式。 – jspboix 2013-03-07 09:31:45