]> source.dussan.org Git - vaadin-framework.git/commitdiff
Add API for disabling native events for IE in tests
authorTeemu Suo-Anttila <teemusa@vaadin.com>
Thu, 5 Nov 2015 11:06:11 +0000 (13:06 +0200)
committerTeemu Suo-Anttila <teemusa@vaadin.com>
Thu, 5 Nov 2015 11:06:11 +0000 (13:06 +0200)
Change-Id: Ifcca52fee1036f5b31ba87c8257b884d04709297

uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java

index c5bdffb7a676f0282de5f934ddab7e9cc15dd998..2190507ce7e2e8d8ac6e087cd33b759d2b962f41 100644 (file)
@@ -904,6 +904,19 @@ public abstract class AbstractTB3Test extends ParallelTest {
         return true;
     }
 
+    /**
+     * Should the "native events" be enabled for Internet Explorer.
+     * <p>
+     * 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();
index 23ead80fcec3ce275aa3a3df129ea7452058d2bd..d1af903cee06e50f0c7d2c3bf3aa8422b27abe0e 100644 (file)
@@ -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");