Open cwchiu opened 5 years ago
To me it looks like youtube.com hasn’t finished loading yet by the point the screenshot is taken?
i waited for 10 min. but i still get the same screenshot
What should I do?
And loading the document without a WebDriver session works just fine?
Sorry to keep asking questions, but this issue lacks enough details to be reproducible.
Try to run Firefox via -screenshot %url%
to create a screenshot in headless mode.
Ok, I run
got screenshot.png
is this a firefox
bug?
Yes, as it looks like. I did a quick check and actually found https://bugzilla.mozilla.org/show_bug.cgi?id=1412061 which sounds to be related. Feel free to comment over there.
What's interesting is that Marionette causes a similar outcome. I wonder if most of the page content is loaded via AJAX, and as such the page isn't fully displayed yet. Checking with the network panel of dev tool might give an indication here.
@whimboo Thanks for your reply.
Please see the following Firefox bug which I just filed: https://bugzilla.mozilla.org/show_bug.cgi?id=1563720
Also note that in the WebDriver specification we currently do not have an option for users to wait for every resource to be loaded, but just for DOMContentLoaded
and pageshow
. So it's not doable with geckodriver right now.
See also https://github.com/w3c/webdriver/issues/895 and https://github.com/w3c/webdriver/issues/893.
I will reopen this issue until it can be fully fixed.
System
Testcase
Firefox Fail
Chrome Success