Author: konstantin.mishin
Date: 2008-12-05 12:14:13 -0500 (Fri, 05 Dec 2008)
New Revision: 11592
Modified:
trunk/test-applications/seleniumTest/richfaces/pom.xml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
Log:
RF-5197
only for test
Modified: trunk/test-applications/seleniumTest/richfaces/pom.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/pom.xml 2008-12-05 17:05:13 UTC (rev
11591)
+++ trunk/test-applications/seleniumTest/richfaces/pom.xml 2008-12-05 17:14:13 UTC (rev
11592)
@@ -85,52 +85,6 @@
</plugin>
</plugins>
</build>
- <profiles>
- <profile>
- <id>linux</id>
- <activation>
- <os>
- <family>unix</family>
- </os>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.1</version>
- <executions>
- <execution>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <executable>
-#find firefox
-PATHS=( '/usr/lib/firefox-1.0.4/' '/usr/lib/firefox-1.5.0.10/'
'/usr/lib/firefox-1.5.0.12/' '/usr/lib64/firefox-1.5.0.12/'
'/usr/lib/firefox-3.0b5/' '/usr/lib64/firefox-3.0b5/'
'/usr/lib/firefox-3.0.1/' '/usr/lib64/firefox-3.0.1/'
'/usr/lib/firefox/' '/opt/MozillaFirefox/lib/')
-for ELEMENT in ${PATHS[@]}
- do
- if [ -f $ELEMENT/firefox ]
- then
- export FF_BIN=$ELEMENT/firefox
- export LD_LIBRARY_PATH=$ELEMENT
- fi
- if [ -f $ELEMENT/firefox-bin ]
- then
- export FF_BIN=$ELEMENT/firefox-bin
- export LD_LIBRARY_PATH=$ELEMENT
- fi
-done
- </executable>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
<repositories>
<repository>
<releases>
@@ -143,10 +97,4 @@
<
url>http://snapshots.jboss.org/maven2</url>
</repository>
</repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>codehaus</id>
- <
url>http://repository.codehaus.org/</url>
- </pluginRepository>
- </pluginRepositories>
</project>
\ No newline at end of file
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-12-05
17:05:13 UTC (rev 11591)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-12-05
17:14:13 UTC (rev 11592)
@@ -141,6 +141,30 @@
@BeforeClass
@Parameters({"browser", "filterPrefix"})
public void startSelenium(String browser, String filterPrefix) {
+ String[] paths = {"/usr/lib/firefox-1.0.4/firefox",
+ "/usr/bin/firefox-1.5.0.10/firefox",
+ "/usr/bin/firefox-1.5.0.12/firefox",
+ "/usr/bin64/firefox-1.5.0.12/firefox",
+ "/usr/bin/firefox-3.0b5/firefox",
+ "/usr/bin64/firefox-3.0b5/firefox",
+ "/usr/bin/firefox-3.0.1/firefox",
+ "/usr/bin64/firefox-3.0.1/firefox",
+ "/usr/bin/firefox/firefox"
+ };
+ if ("*firefox".equals(browser)) {
+ for (int i = 0; i < paths.length &&
"*firefox".equals(browser); i++) {
+ String path = paths[i];
+ File file = new File(path);
+ if (file.isFile()) {
+ browser += " " + path;
+ } else {
+ file = new File(path + "-bin");
+ if (file.isFile()) {
+ browser += " " + path + "-bin";
+ }
+ }
+ }
+ }
synchronized (MUTEX) {
this.filterPrefix = filterPrefix;
selenium = createSeleniumClient(protocol + "://" + host +
":" + port + "/", browser);