New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 648233 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue chromedriver:1554
Owner: ----
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug-Regression



Sign in to add a comment

Open a new tab in webdriver test using CTRL + t suddenly fails on Chrome beta.

Project Member Reported by csperl@google.com, Sep 19 2016

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

 
Components: Tests>WebDriver
Labels: -Type-Bug Needs-Bisect Type-Bug-Regression
Project Member

Comment 3 by sheriffbot@chromium.org, Sep 20 2016

Labels: Hotlist-Google
Would it be possible to provide as sample html test case for ease of bisecting.

Comment 5 by ajha@chromium.org, Sep 21 2016

Cc: ajha@chromium.org
Labels: Needs-Feedback

Comment 6 by csperl@google.com, 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();

Comment 7 by ajha@chromium.org, Sep 29 2016

Cc: samu...@chromium.org
Labels: -Needs-Feedback TE-NeedsTriageHelp
Cc'ing samuong@ for help in further investigation of this.
Mergedinto: 1554
Status: Duplicate (was: Unconfirmed)
This is a duplicate of  issue chromedriver:1554 .
Mergedinto: -1554 chromedriver:1554

Sign in to add a comment