Headless: Popup windows aren't opened |
||||
Issue descriptionOriginally 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.
,
Apr 20 2017
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.
,
Apr 25 2017
Thanks for the video. Looks like there's something wrong with how popup windows are initialized in headless mode.
,
May 12 2017
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.
,
May 15 2017
,
May 15 2017
#4: That seems like a different bug -- please file a new issue at crbug.com.
,
Jul 17 2017
Looks to be related to viewport size. Captured a trace (attached), and it shows a few "LayerTreeHostImpl::CanDraw empty viewport" events.
,
Jul 17 2017
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
,
Jul 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/82ad0e9a068d881a1c5207c62ee79d3d9a43e311 commit 82ad0e9a068d881a1c5207c62ee79d3d9a43e311 Author: Eric Seckler <eseckler@chromium.org> Date: Mon Jul 17 15:52:22 2017 [headless] Resize new WebContents to initial size when they are added. Bug: 696439 Change-Id: Ib57bd3c95ce734d8a26c798f43fbfa94fcf3a67a Reviewed-on: https://chromium-review.googlesource.com/574531 Commit-Queue: Eric Seckler <eseckler@chromium.org> Reviewed-by: Alex Clarke <alexclarke@chromium.org> Cr-Commit-Position: refs/heads/master@{#487095} [modify] https://crrev.com/82ad0e9a068d881a1c5207c62ee79d3d9a43e311/headless/lib/browser/headless_web_contents_impl.cc [modify] https://crrev.com/82ad0e9a068d881a1c5207c62ee79d3d9a43e311/headless/lib/browser/headless_web_contents_impl.h [modify] https://crrev.com/82ad0e9a068d881a1c5207c62ee79d3d9a43e311/headless/lib/headless_web_contents_browsertest.cc [modify] https://crrev.com/82ad0e9a068d881a1c5207c62ee79d3d9a43e311/headless/test/data/window_open.html
,
Jul 17 2017
,
Feb 20 2018
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
,
Feb 20 2018
@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 |
||||
Comment 1 by skyos...@chromium.org
, Feb 27 2017