From: Teemu Suo-Anttila Date: Thu, 5 Nov 2015 11:06:11 +0000 (+0200) Subject: Add API for disabling native events for IE in tests X-Git-Tag: 7.5.9~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6da674f2dfae2e2bc5de22b89a0b7e7648d52ed7;p=vaadin-framework.git Add API for disabling native events for IE in tests Change-Id: Ifcca52fee1036f5b31ba87c8257b884d04709297 --- diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java index c5bdffb7a6..2190507ce7 100644 --- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java +++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java @@ -904,6 +904,19 @@ public abstract class AbstractTB3Test extends ParallelTest { return true; } + /** + * Should the "native events" be enabled for Internet Explorer. + *

+ * Native events sometimes cause failure in clicking on buttons/checkboxes + * but are possibly needed for some operations. + * + * @return true, to use "native events", false to use generated Javascript + * events + */ + protected boolean useNativeEventsForIE() { + return true; + } + // FIXME: Remove this once TB4 getRemoteControlName works properly private RemoteWebDriver getRemoteDriver() { WebDriver d = getDriver(); diff --git a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java index 23ead80fce..d1af903cee 100644 --- a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java +++ b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java @@ -96,6 +96,10 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration { InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING, false); } + if (!useNativeEventsForIE()) { + desiredCapabilities.setCapability( + InternetExplorerDriver.NATIVE_EVENTS, false); + } } desiredCapabilities.setCapability("project", "Vaadin Framework");