Преглед на файлове

Support setting persistent hover and require window focus parameters

Change-Id: I0b2bb3fba1a8a854799fd087601ba54988ec423b
tags/7.3.0.rc1
Artur Signell преди 9 години
родител
ревизия
c8e6c34348
променени са 1 файла, в които са добавени 38 реда и са изтрити 0 реда
  1. 38
    0
      uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java

+ 38
- 0
uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java Целия файл

@@ -233,6 +233,15 @@ public abstract class AbstractTB3Test extends TestBenchTestCase {
*/
private void setupRemoteDriver(DesiredCapabilities capabilities)
throws Exception {
if (BrowserUtil.isIE(capabilities)) {
capabilities.setCapability(
InternetExplorerDriver.REQUIRE_WINDOW_FOCUS,
requireWindowFocusForIE());
capabilities.setCapability(
InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING,
usePersistentHoverForIE());
}

for (int i = 1; i <= BROWSER_INIT_ATTEMPTS; i++) {
try {
WebDriver dr = TestBench.createDriver(new RemoteWebDriver(
@@ -1128,4 +1137,33 @@ public abstract class AbstractTB3Test extends TestBenchTestCase {
return findElement(By.xpath("//button[@title='Debug message log']"));
}

/**
* Should the "require window focus" be enabled for Internet Explorer.
* RequireWindowFocus makes tests more stable but seems to be broken with
* certain commands such as sendKeys. Therefore it is not enabled by default
* for all tests
*
* @return true, to use the "require window focus" feature, false otherwise
*/
protected boolean requireWindowFocusForIE() {
return false;
}

/**
* Should the "enable persistent hover" be enabled for Internet Explorer.
*
* Persistent hovering causes continuous firing of mouse over events at the
* last location the mouse cursor has been moved to. This is to avoid
* problems where the real mouse cursor is inside the browser window and
* Internet Explorer uses that location for some undefined operation
* (http://
* jimevansmusic.blogspot.fi/2012/06/whats-wrong-with-internet-explorer
* .html)
*
* @return true, to use the "persistent hover" feature, false otherwise
*/
protected boolean usePersistentHoverForIE() {
return true;
}

}

Loading…
Отказ
Запис