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:
,
Aug 28 2017
,
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);
});
});
,
Aug 28 2017
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
,
Aug 28 2017
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
,
Aug 28 2017
,
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()
,
Aug 29 2017
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
,
Aug 29 2017
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 |
||||||
Comment 1 by dvallet@chromium.org
, Aug 28 2017Components: -Blink Internals>Headless
Labels: Needs-Feedback