Selenium save screenshot does not always capture visible view port
Categories
(Remote Protocol :: Marionette, defect, P3)
Tracking
(Not tracked)
People
(Reporter: igor, Unassigned)
References
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15
Steps to reproduce:
- Load page "https://getbootstrap.com/docs/4.0/components/modal/" with Firefox selenium webdriver
- Use webdriver to find and click element with xpath "//button[@data-target='#exampleModalCenter']"
- Use webdriver to save screenshot into file
- Observe screenshot
Actual results:
Screenshot without modal popup displayed in browser is captured
Expected results:
Screenshot with modal popup is captured, same as in browser
Example python selenium script attached.
This issue introduced with firefox 88 (firefox 87 does not have this issue).
I already reported same issue for screenshot tool and it was fixed but somehow it was left in webdriver https://bugzilla.mozilla.org/show_bug.cgi?id=1710635
Reporter | ||
Comment 1•3 years ago
|
||
Reporter | ||
Comment 2•3 years ago
|
||
Comment 3•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Screenshots' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 4•3 years ago
|
||
I'm not sure what the right component for this is, but it is not related to the "Screenshots" feature in Firefox.
Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 7•3 years ago
|
||
After bug 1198432 comment 24 I'm going to reopen this bug. As it looks like it's indeed not related to bug 1198432.
I checked myself quickly, and indeed Firefox 89 doesn't show the modal dialog anymore. Also more recent releases of Firefox do not show it. But surprisingly the Firefox 93 beta contains the modal dialog again in a screenshot. We haven't changed anything on our side, so I would assume that there might have been some regression in graphics that might have caused that.
Igor, could you maybe check if it also works for you in the most recent beta or devedition build? Thanks!
If yes, it might still be good to know what fixed that, but I might not have the time to check for that.
Comment 8•3 years ago
|
||
Maybe worth noting that the dialog in the "expected" case here is not a Firefox dialog anyway; it's entirely within the webpage, so completely orthogonal to any issues with alert()
, prompt()
or http auth dialogs, or select popups...
Reporter | ||
Comment 9•3 years ago
|
||
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #7)
Igor, could you maybe check if it also works for you in the most recent beta or devedition build? Thanks!
I downloaded 93.0b7 (Mac) and looks like selenium driver indeed produces screenshots with modal dialogs. Thanks!
Updated•3 years ago
|
Comment 10•3 years ago
|
||
Thanks for your feedback. I did a quick test with mozregression and that's the result for the fix:
6:51.26 INFO: Narrowed integration fix window from [820a165f, 552d8919] (3 builds) to [820a165f, 0ad5237c] (2 builds) (~1 steps left)
6:51.26 INFO: No more integration revisions, bisection finished.
6:51.26 INFO: First good revision: 0ad5237cea2d78d6650b6c8c9d913ec9fd98d444
6:51.26 INFO: Last bad revision: 820a165f2cf5ffc89aa59b8edc58f8cdb1f359d2
6:51.26 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=820a165f2cf5ffc89aa59b8edc58f8cdb1f359d2&tochange=0ad5237cea2d78d6650b6c8c9d913ec9fd98d444
That means that bug 1708403 fixed the problem and sounds actually pretty similar by using https://mdbootstrap.com/docs/standard/components/modal/. As such I'm going to mark this bug as duplicate.
Updated•1 year ago
|
Description
•