diff options
author | Olivier Lamy <olamy@apache.org> | 2012-12-25 23:13:14 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-12-25 23:13:14 +0000 |
commit | 36b4a362b0307040aedae5a98f92c34799051ef8 (patch) | |
tree | bffaff892ffc4873395f0dcc6080208ad3a76ab4 /archiva-modules/archiva-web/archiva-webapp-test-js | |
parent | 5440040c8fff9d94bd28d70e28746289b88a74d0 (diff) | |
download | archiva-36b4a362b0307040aedae5a98f92c34799051ef8.tar.gz archiva-36b4a362b0307040aedae5a98f92c34799051ef8.zip |
different WebDriver depending on selenium.browser sysprop
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1425784 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webapp-test-js')
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp-test-js/src/test/java/org/apache/archiva/web/test/WebDriverTest.java | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/java/org/apache/archiva/web/test/WebDriverTest.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/java/org/apache/archiva/web/test/WebDriverTest.java index 6631c4354..94c7f393b 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/java/org/apache/archiva/web/test/WebDriverTest.java +++ b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/java/org/apache/archiva/web/test/WebDriverTest.java @@ -19,14 +19,17 @@ package org.apache.archiva.web.test; */ import junit.framework.Assert; -import junit.framework.TestCase; +import org.apache.commons.lang3.StringUtils; import org.fluentlenium.adapter.FluentTest; import org.fluentlenium.core.domain.FluentList; import org.fluentlenium.core.domain.FluentWebElement; import org.junit.Test; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; +import org.openqa.selenium.ie.InternetExplorerDriver; +import org.openqa.selenium.safari.SafariDriver; import java.io.File; import java.io.FileInputStream; @@ -71,6 +74,24 @@ public class WebDriverTest @Override public WebDriver getDefaultDriver() { + String seleniumBrowser = System.getProperty( "selenium.browser" ); + + if ( StringUtils.contains( seleniumBrowser, "chrome" ) ) + { + return new ChromeDriver(); + } + + if ( StringUtils.contains( seleniumBrowser, "safari" ) ) + { + return new SafariDriver(); + } + + if ( StringUtils.contains( seleniumBrowser, "iexplore" ) ) + { + return new InternetExplorerDriver(); + } + return new FirefoxDriver(); + } } |