diff options
author | Artur Signell <artur@vaadin.com> | 2013-10-14 22:05:40 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-10-15 17:11:16 +0300 |
commit | f9ea9b31d4b97714fefeb7970600c1058f794e5e (patch) | |
tree | 5f26f7afdabe7f23f70336cfa832b19ef7d6f97f /uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java | |
parent | ce89a75620078677d118769a74d5b2cf778c9792 (diff) | |
download | vaadin-framework-f9ea9b31d4b97714fefeb7970600c1058f794e5e.tar.gz vaadin-framework-f9ea9b31d4b97714fefeb7970600c1058f794e5e.zip |
Allow running tests locally by overriding runLocally() (#12786)
Uses Firefox either from path or from the location given using firefox.path in /work/run-eclipse-run-selected-test.properties
Change-Id: I29faa94cac4c978792a8fab9db338048553d166a
Diffstat (limited to 'uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java index 09615f0b2e..a2922af28f 100644 --- a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java +++ b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java @@ -25,6 +25,12 @@ import java.net.SocketException; import java.util.Enumeration; import java.util.Properties; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.firefox.FirefoxBinary; +import org.openqa.selenium.firefox.FirefoxDriver; + +import com.vaadin.testbench.TestBench; + /** * Provides values for parameters which depend on where the test is run. * Parameters should be configured in work/eclipse-run-selected-test.properties. @@ -132,4 +138,23 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test { "No compatible (192.168.*) ip address found."); } + /* + * (non-Javadoc) + * + * @see com.vaadin.tests.tb3.AbstractTB3Test#setupLocalDriver() + */ + @Override + protected void setupLocalDriver() { + String firefoxPath = getProperty("firefox.path"); + WebDriver driver; + if (firefoxPath != null) { + driver = new FirefoxDriver( + new FirefoxBinary(new File(firefoxPath)), null); + } else { + driver = new FirefoxDriver(); + } + setDriver(TestBench.createDriver(driver)); + setDesiredCapabilities(BrowserUtil + .firefox(MultiBrowserTest.TESTED_FIREFOX_VERSION)); + } } |