Issue metadata
Sign in to add a comment
|
Open a new tab in webdriver test using CTRL + t suddenly fails on Chrome beta. |
||||||||||||||||||||||||
Issue description
Chrome Version : 54.0.2840.16
OS Version : Linux
URLs (if applicable) :
Other browsers tested:
Chrome 53.0.2785.89 OK
IE 10 OK
IE 11 OK
What steps will reproduce the problem?
We have a webdriver test which needs several tabs. It wants to open another tab by pressing CTRL + t using the following code:
new Actions(driver).keyDown(Keys.CONTROL).sendKeys("t").keyUp(Keys.CONTROL).perform();
However this test started to fail on 2016-09-15 8pm (CEST) = 2016-09-15 11am (PDT) on chrome beta running on Linux. It is still working on other browsers.
The problem is that it does not open a new tab anymore. Any ideas why this fails?
What is the expected result?
A new tab should be opened.
What happens instead of that?
Nothing. No tab opens and the test stops with a timeout of the next step.
If I run the webdriver test locally and press CTRL + t manually, then everything works as expected.
Thanks,
Christoph
,
Sep 20 2016
,
Sep 20 2016
,
Sep 20 2016
Would it be possible to provide as sample html test case for ease of bisecting.
,
Sep 21 2016
,
Sep 27 2016
Hello,
I created a Java test which shows the difference between the two browser versions. In this test I send the Keys CTRL + TAB to the browser to switch the tab which is in the foreground. This worked well for the chrome browsers (<= 53.0.2785.89), but does not work anymore for the chrome browser with the version (54.0.2840.16). The same thing happens if I send the Keys CTRL + t to open a new tab as stated in the original bug description.
WebDriver driver = ...;
// Load a page on the first tab.
driver.get("https://www.google.com");
// For testing purposes I use Thread.sleep to add some pauses to actually see what happens.
Thread.sleep(1000);
// Save handle of the first window.
final String firstWindow = driver.getWindowHandle();
// Open a new tab.
org.openqa.selenium.JavascriptExecutor executor =
(org.openqa.selenium.JavascriptExecutor) driver;
executor.executeScript("window.open()");
// Identify handle of the second window.
ArrayList<String> tabs = new ArrayList<String>(driver.getWindowHandles());
assertThat(tabs).hasSize(2);
assertThat(tabs).contains(firstWindow);
String secondWindow = tabs.get(0).equals(firstWindow) ? tabs.get(1) : tabs.get(0);
// Switch driver to the second tab.
driver.switchTo().window(secondWindow);
// Load maps on the second tab.
driver.get("https://maps.google.com");
Thread.sleep(1000);
// ######################################
// Bring the first tab to the foreground.
// This works for Chrome (53.0.2785.89), but does not do anything for Chrome (54.0.2840.16).
// We need this to change the tab which is currently in the foreground, because we need our test
// to fire the event when a tab gets the focus.
new Actions(driver).keyDown(Keys.CONTROL).sendKeys(Keys.TAB).keyUp(Keys.CONTROL).perform();
// ######################################
Thread.sleep(1000);
// Switch driver back to the first tab.
driver.switchTo().window(firstWindow);
// Close first tab.
driver.close();
,
Sep 29 2016
Cc'ing samuong@ for help in further investigation of this.
,
Nov 16 2016
This is a duplicate of issue chromedriver:1554 .
,
Nov 16 2016
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by elawrence@chromium.org
, Sep 20 2016