[
http://jira.codehaus.org/browse/MSELENIUM-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_102105
]
John Kew commented on MSELENIUM-19:
-----------------------------------
I think this bug report is a result of some confusion on my part. I assumed
that the selenium server used this system property, but it appears that the
client driver uses the variable. Either way, I can accomplish the same thing by
having:
maven-surefire-plugin configuration:
<systemProperties>
<property>
<name>browser</name>
<value>${browser}</value>
</property>
</systemProperties>
and the following in my Selenium Java test:
String browser = System.getProperty( "browser" );
if ( browser.length() == 0)
{
browser = "*firefox";
}
selenium = new DefaultSelenium("localhost", 4444, browser,
"http://localhost:8080");
I discovered this after visiting:
http://release.openqa.org/selenium-remote-control/0.9.0/doc/java/com/thoughtworks/selenium/DefaultSelenium.html
http://svn.apache.org/viewvc/maven/shared/trunk/maven-web-ui-tests/src/main/java/org/apache/maven/shared/web/test/AbstractSeleniumTestCase.java?view=markup
http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/pom.xml?view=markup
> Unable to override firefoxDefaultPath from command line or pom
> --------------------------------------------------------------
>
> Key: MSELENIUM-19
> URL: http://jira.codehaus.org/browse/MSELENIUM-19
> Project: Maven 2.x Selenium Plugin
> Issue Type: Bug
> Components: start-server
> Affects Versions: 1.0-beta-1
> Environment: x64, Linux
> Reporter: John Kew
> Assignee: Jason Dillon
>
> I am unable to modify the default path for firefox with the -D option, or
> through the pom file (unless I'm missing some critical insight). The firefox
> tests run fine when I modify the PATH environment variable, but ideally I
> would like to modify the java.system.firefoxDefaultPath property so I can
> easily integrate the tests with continuum.
> Would like to do this:
> mvn -P selen-test,tomcat-ci
> -Djava.system.firefoxDefaultPath=/usr/lib64/firefox-1.5.0.12/firefox-bin
> clean install
> Or do this:
> <profile>
> <id>selen-test</id>
> <build>
> <plugins>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>selenium-maven-plugin</artifactId>
> <version>1.0-beta-2-SNAPSHOT</version>
> <executions>
> <execution>
> <id>start</id>
> <phase>pre-integration-test</phase>
> <goals>
> <goal>xvfb</goal>
> <goal>start-server</goal>
> </goals>
> <!-- WOULD LIKE TO DO THIS:
> <properties>
> <property>
> <name>java.system.firefoxDefaultPath</name>
> <value>/usr/lib64/firefox-1.5.0.12/firefox-bin</value>
> </property>
> </properties>-->
> <configuration>
> <background>true</background>
> </configuration>
> </execution>
> </executions>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <skip>true</skip>
> </configuration>
> <executions>
> <execution>
> <id>surefire-it</id>
> <phase>integration-test</phase>
> <goals>
> <goal>test</goal>
> </goals>
> <configuration>
> <includes>
> <include>**/selenium/*Selenium*Test*.java</include>
> </includes>
> <excludes>
> </excludes>
> <skip>false</skip>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> </profile>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email