Closed Bug 1725343 Opened 3 years ago Closed 3 years ago

Selenium save screenshot does not always capture visible view port

Categories

(Remote Protocol :: Marionette, defect, P3)

Firefox 91
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1708403

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

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.

Component: Untriaged → Screenshots

I'm not sure what the right component for this is, but it is not related to the "Screenshots" feature in Firefox.

Component: Screenshots → General
Product: Firefox → Testing
Component: General → geckodriver
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Component: geckodriver → Marionette
Resolution: --- → DUPLICATE

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.

Status: RESOLVED → REOPENED
Ever confirmed: true
Flags: needinfo?(igor)
Resolution: DUPLICATE → ---

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...

(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!

Flags: needinfo?(igor)
Severity: -- → S3
Priority: -- → P3

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.

Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → DUPLICATE
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: