diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-05-14 16:31:28 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-05-15 10:01:08 +0000 |
commit | cfbe3e213efed691cddc5f96cfe900544931658a (patch) | |
tree | ce3b72fd92dc59717883486d02daacd97d768286 /uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java | |
parent | 40a80c51803a109083d3949039448beeefd7f9da (diff) | |
download | vaadin-framework-cfbe3e213efed691cddc5f96cfe900544931658a.tar.gz vaadin-framework-cfbe3e213efed691cddc5f96cfe900544931658a.zip |
Make Vaadin TB3/4 tests work and run on PhantomJS (#13291)
Change-Id: I0d1747d41b3b9e0a32d995a5cea9081292c8c2c6
Diffstat (limited to 'uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java index 0a0e498981..7be55ff298 100644 --- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java +++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java @@ -956,10 +956,14 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { } public void hitButton(String id) { - WebDriverBackedSelenium selenium = new WebDriverBackedSelenium(driver, - driver.getCurrentUrl()); + if (BrowserUtil.isPhantomJS(getDesiredCapabilities())) { + driver.findElement(By.id(id)).click(); + } else { + WebDriverBackedSelenium selenium = new WebDriverBackedSelenium( + driver, driver.getCurrentUrl()); - selenium.keyPress("id=" + id, "\\13"); + selenium.keyPress("id=" + id, "\\13"); + } } protected void openDebugLogTab() { |