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

Issue 737600 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit 29 days ago
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Headless mode: switching windows/tabs breaks chrome

Reported by cristian...@gmail.com, Jun 28 2017

Issue description

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

Steps to reproduce the problem:
1. Use an automation tool to navigate to 'https://francisduvivier.github.io/WebDriverTestHTML/blanktargettest.html' and click to create a new page
2. switch to the new page
3. try to take a screenshot
4. check whether any element on the page has 'displayed' quality

What is the expected behavior?
3. A screenshot should be taken, chrome should not freeze
4.  elements should be shown as `displayed?: true`

What went wrong?
I believe Chrome Headless mode does not work for switching between windows (possibly iframes as well, but haven't tested fully)
I have been using the latest selenium for automation (ruby selenium-webdriver 3.4.3) and the latest chromedriver (2.30.477690)

To be clear, normal chrome works as expeted and headless chrome works as expected before switching to a new window/tab

After switching to a new window/tab, attempting to take a screenshot freezes the driver and all observable elements are "displayed: false" (even though their html begs to differ)

Weirdly, `driver.find_element(:xpath, '//body').displayed?` returns `true` (the only element I could find that does that)

Did this work before? No 

Chrome version: 60.0.3112.40  Channel: beta
OS Version: OS X 10.11.6
Flash Version:
 
Labels: Needs-Triage-M60
Labels: TE-NeedsTriageHelp
The issue seems to be out of TE-scope. Hence, marking label TE-NeedsTriageHelp for further investigation.

Thanks...!!
sorry, but what does TE stand for? I can't seem to find it anywhere
Cc: dvallet@chromium.org eseckler@chromium.org
Components: Internals>Headless
Labels: -TE-NeedsTriageHelp -Needs-Triage-M60
Can you share the automation script you're using?

Could this be a bug with ChromeDriver?
Will simplify code in a minute, but yes, I am using ChromeDriver
I can repro this without ChromeDriver locally:

# headless_shell --remote-debugging-port=9222 https://francisduvivier.github.io/WebDriverTestHTML/blanktargettest.html

Then connect the devtools frontend (http://localhost:9222) to the open tab, click on the link. You'll see the new tab appear on http://localhost:9222, and you can inspect it, but the frontend doesn't render any screenshots.

Maybe we're forgetting to set the new WebContents visible or something like that?
Owner: dvallet@chromium.org
Components: -Platform>DevTools
Labels: OS-Linux OS-Windows
Status: Assigned (was: Unconfirmed)
Thanks, I was able to repro too
Looks like its not Mac specific, happy to take a look when I have time
Status: Fixed (was: Assigned)
Apparently, https://chromium-review.googlesource.com/c/574531 fixed this issue, so marking as fixed

Sign in to add a comment