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

Issue 759248 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Tab management is not working with Headless Chrome

Reported by pshah2...@gmail.com, Aug 26 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36

Steps to reproduce the problem:
1. Use headless chrome via node-modules web driver manager in Protractor project
Currently using webdriver-manager/selenium/chromedriver_2.31
2. browser.executeScript('window.open()');
3. browser.switchTo().window(tab2).then(function ()
4. the same steps work perfectly when used with regular standard chrome

What is the expected behavior?

What went wrong?
jasmine time out with headless chrome, same code works perfectly when --headless is commented out

Did this work before? N/A 

Chrome version: 60.0.3112.90  Channel: n/a
OS Version: OS X 10.12.5
Flash Version:
 
Cc: dvallet@chromium.org
Components: -Blink Internals>Headless
Labels: Needs-Feedback
Thanks for the report. 
Can you please provide the whole script so we can try and reproduce. 


Cc: jzfeng@chromium.org

Comment 3 by pshah2...@gmail.com, Aug 28 2017

hi, here the function I am using to open a new tab and switch to it

    this.OpenInNewTab = function(url, contains) {

        browser.executeScript('window.open()');
        //browser.sleep(3000);
        browser.getAllWindowHandles().then(function (handles) {
            var newTabHandle = handles[1];
            browser.switchTo().window(newTabHandle).then(function () {
                // Expect the newly opened tab URL to equal the href of the invitation
                browser.get(url);
                expect(browser.driver.getCurrentUrl()).toContain(contains);
            });
        });
Project Member

Comment 4 by sheriffbot@chromium.org, Aug 28 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "dvallet@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Thanks!
There was an issue on Mac where opening windows through javascript would not work properly on headless. 
Would you mind testing the same code with Chrome Canary? I believe the fix should be in version 62
Labels: Needs-Feedback

Comment 7 by pshah2...@gmail.com, Aug 29 2017

Running the test with chrome canary does open a new tab but has another issue with clicking an element. It may be due to incompatility with node-modules/webdriver-manager. I am not sure though.

Here is a piece of error log I got - 
Failed: unknown error: Element is not clickable at point (71, 2607)
  (Session info: headless chrome=62.0.3199.0)
  (Driver info: chromedriver=2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b),platform=Mac OS X 10.12.5 x86_64)
WebDriverError: unknown error: Element is not clickable at point (71, 2607)
  (Session info: headless chrome=62.0.3199.0)
  (Driver info: chromedriver=2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b),platform=Mac OS X 10.12.5 x86_64)
    at WebDriverError (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:27:5)
    at Object.checkLegacyResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:505:15)
    at parseHttpResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
    at doSend.then.response (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:440:13)
    at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebElement.click()

Project Member

Comment 8 by sheriffbot@chromium.org, Aug 29 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "dvallet@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: WontFix (was: Unconfirmed)
Thanks for checking!
That sounds like another bug, feel free to open a new one with steps to reproduce.

Sign in to add a comment