diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/tb3')
-rw-r--r-- | uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java | 10 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java | 1 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/tb3/WebsocketTest.java | 1 |
3 files changed, 9 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() { diff --git a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java index 13c34d475a..74073af217 100644 --- a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java +++ b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java @@ -66,6 +66,7 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration { // Uncomment once we have the capability to run on Safari 6 // allBrowsers.add(SAFARI); allBrowsers.add(Browser.CHROME.getDesiredCapabilities()); + allBrowsers.add(Browser.PHANTOMJS.getDesiredCapabilities()); // Re-enable this when it is possible to run on a modern Opera version // allBrowsers.add(Browser.OPERA.getDesiredCapabilities()); } diff --git a/uitest/src/com/vaadin/tests/tb3/WebsocketTest.java b/uitest/src/com/vaadin/tests/tb3/WebsocketTest.java index d466c39131..778c8b9113 100644 --- a/uitest/src/com/vaadin/tests/tb3/WebsocketTest.java +++ b/uitest/src/com/vaadin/tests/tb3/WebsocketTest.java @@ -41,6 +41,7 @@ public abstract class WebsocketTest extends PrivateTB3Configuration { websocketBrowsers.addAll(MultiBrowserTest.getAllBrowsers()); websocketBrowsers.remove(Browser.IE8.getDesiredCapabilities()); websocketBrowsers.remove(Browser.IE9.getDesiredCapabilities()); + websocketBrowsers.remove(Browser.PHANTOMJS.getDesiredCapabilities()); } /** |