diff options
author | Henri Sara <henri.sara@gmail.com> | 2017-02-13 16:48:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-13 16:48:15 +0200 |
commit | 4c61090f2da4109f8455fd03df9c876a0286fc07 (patch) | |
tree | 97ffdbd4305c48fc7a018e85ef29e6ea7ea29958 /uitest-common/src | |
parent | e34b45eb4c096cf16219fa1f71bab8ab55947d5c (diff) | |
download | vaadin-framework-4c61090f2da4109f8455fd03df9c876a0286fc07.tar.gz vaadin-framework-4c61090f2da4109f8455fd03df9c876a0286fc07.zip |
Add workarounds for Firefox in context click tests (#8547)
Diffstat (limited to 'uitest-common/src')
-rw-r--r-- | uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java index 6a82492da5..0322d76949 100644 --- a/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java +++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/AbstractTB3Test.java @@ -1012,6 +1012,17 @@ public abstract class AbstractTB3Test extends ParallelTest { } } + protected void contextClickElement(WebElement element) { + if (BrowserUtil.isFirefox(getDesiredCapabilities())) { + // Workaround for Selenium/TB and Firefox 45 issue + getCommandExecutor().executeScript( + "var ev = document.createEvent('HTMLEvents'); ev.initEvent('contextmenu', true, false); arguments[0].dispatchEvent(ev);", + element); + } else { + new Actions(getDriver()).contextClick(element).perform(); + } + } + protected boolean isLoadingIndicatorVisible() { WebElement loadingIndicator = findElement( By.className("v-loading-indicator")); |