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

Issue 696439 link

Starred by 9 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 604324


Show other hotlists

Hotlists containing this issue:
Hotlist-1


Sign in to add a comment

Headless: Popup windows aren't opened

Project Member Reported by eseckler@chromium.org, Feb 27 2017

Issue description

Originally posted by jon.normington@gmail.com at https://bugs.chromium.org/p/chromium/issues/detail?id=604324#c16

Window popups are not working with the headless_shell.

You can verify with the following command;

headless_shell --remote-debugging-port=9222 --window-size=1280,1024 http://html.com/javascript/popup-windows/

Open the devtools on in a browser click on the link my popup under the section 'The Basics' - observe no errors/logs from either headless_shell or the devtools console

It isn't specific to that web page - but also on our internal app ran by the test suite which uses the pop windows for oauth(2) authorization flow. Driven by selenium webdriver chromedriver. It appears is it able to see the page content - but is unable to interact with the popup window.
 
Status: Available (was: Untriaged)
Maybe we have the pop-up blocker enabled by default somehow?
I recorded a movie - https://www.youtube.com/watch?v=5lh11754KZ8 - showing that the popups are being created, and the remote debugger shows their DOM, but the screens aren't rendered.

I'm seeing the same issue with the latest Canary Chrome in headless mode with popup blocking disabled:

/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --disable-gpu --headless --disable-popup-blocking --remote-debugging-port=9222

When I do this programmatically using the Remote Debugging Protocol, I detect the "Target.targetCreated" event that tells me the new window has been created, and I can connect to it using ws://localhost:9222/devtools/page/<popup_target_id>.

However, I don't get any DOM events in the popup and calls to "Runtime.evaluate" that operate on the DOM don't return anything.  "Page.captureScreenshot" doesn't return anything either.

This is with "Version 60.0.3076.0 (Official Build) canary (64-bit)", and I see the same results with the Docker Linux image here: https://github.com/yukinying/chrome-headless-browser-docker

Please let me know if you need any further information reproducing the issue.
Thanks for the video. Looks like there's something wrong with how popup windows are initialized in headless mode.
Hi,

this is the closest description to the bug I face with Chrome on Windows 10.

I can't uses icons like Profile, save password, install extension because there is no pop up that shows up. Nothing happens. If I click too many times, Chrome hangs up.
chrome _bug.png
5.5 KB View Download
Components: Internals>Headless
#4: That seems like a different bug -- please file a new issue at crbug.com.
Owner: eseckler@chromium.org
Status: Assigned (was: Available)
Looks to be related to viewport size. Captured a trace (attached), and it shows a few "LayerTreeHostImpl::CanDraw empty viewport" events.
chrometrace.log.gz
3.3 MB Download
Looks like we're not setting the new WebContents size in WebContentsDelegate::AddNewContents as we're supposed to. Sending a patch to fix:

https://chromium-review.googlesource.com/c/574531
Status: Fixed (was: Assigned)
hi Team,

currently am using chrome headless browser testing for my web application.
Everything is working as expected except window popup which is not coming up once click on upload file control.

Senario is i need to upload a file from desktop .
am clicking on upload control
window popup will open
enter path 
press enter
file will get download.

Can you help me here?

Regards,
Anuradha
@anuradha - File upload is not a popup in Headless Chrome.  See this: https://github.com/cyrus-and/chrome-remote-interface/issues/164

Sign in to add a comment