Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

EranMes: Adding a test to clarify issue 3734.

git-svn-id: https://selenium.googlecode.com/svn/trunk@17278 07704840-8298-11de-bf8c-fd130f914ac9
  • Loading branch information...
commit 4be6652096d99cd398a4b656b662342417e7910e 1 parent 8c75343
eran.mes@gmail.com authored
View
26 java/client/test/org/openqa/selenium/interactions/CombinedInputActionsTest.java
@@ -218,4 +218,30 @@ public void testChordControlCutAndPaste() {
assertEquals("abc defabc def", element.getAttribute("value"));
}
+
+ @Ignore({SELENESE, HTMLUNIT, OPERA, IE, SELENESE})
+ @Test
+ public void testCombiningShiftAndClickResultsInANewWindow() {
+ if (!isNativeEventsEnabled(driver) || (!getEffectivePlatform().is(Platform.LINUX))) {
+ System.out.println("Skipping testCombiningShiftAndClickResultsInANewWindow: " +
+ "Only works with native events on Linux.");
+ return;
+ }
+
+ driver.get(pages.linkedImage);
+ WebElement link = driver.findElement(By.id("link"));
+ String originalTitle = driver.getTitle();
+
+ int nWindows = driver.getWindowHandles().size();
+ new Actions(driver)
+ .moveToElement(link)
+ .keyDown(Keys.SHIFT)
+ .click()
+ .keyUp(Keys.SHIFT)
+ .perform();
+
+ assertEquals("Should have opened a new window.",
+ nWindows + 1, driver.getWindowHandles().size());
+ assertEquals("Should not have navigated away.", originalTitle, driver.getTitle());
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.