Closed Bug 1802473 Opened 1 year ago Closed 1 year ago

Marionette commands like "WebDriver:FindElements" can fail when Firefox window is occluded on Windows

Categories

(Remote Protocol :: Marionette, defect, P1)

Firefox 102
All
Windows
defect
Points:
1

Tracking

(firefox-esr102 wontfix, firefox107 wontfix, firefox108 wontfix, firefox109 fixed)

RESOLVED FIXED
109 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox107 --- wontfix
firefox108 --- wontfix
firefox109 --- fixed

People

(Reporter: whimboo, Assigned: jdescottes)

References

(Regression, )

Details

(Keywords: regression, Whiteboard: [webdriver:m5], [webdriver:relnote] )

Attachments

(1 file)

Originally reported as: https://github.com/mozilla/geckodriver/issues/2040

This specific failure on Windows only started for Firefox 102 and only happens when parts of the Firefox's window are covered by other applications. In such a case a command like WebDriver:FindElements would not return any element even with the element present in the page.

1662641239206   Marionette      DEBUG   0 -> [0,120,"WebDriver:FindElements",{"using":"xpath","value":"//content-stammdaten-card"}]
1662641239211   Marionette      DEBUG   0 <- [1,120,null,[]]

As the discussion on the issue has shown affected folks can workaround this problem by disabling the preference widget.windows.window_occlusion_tracking.enabled. This has been added on bug 1732733 for Firefox 95 and was then enabled on release for Firefox 102.

Sotaro, do you have an idea why Marionette is not able to perform the command correctly when the window is occluded? I'm not sure if we should just disable this preference in general or if that is a bug which should be fixed. Thanks.

Flags: needinfo?(sotaro.ikeda.g)
Priority: -- → P3
Whiteboard: [webdriver:backlog]

Thanks Sotaro! Are there any plans to bring this feature to other platforms as well in case support for that exists? Or is it Windows only? Also if we would set this preference to false in all the cases I assume it won't have a side-effect for non-Windows platforms?

Flags: needinfo?(sotaro.ikeda.g)

Window occlusion is also supported on MacOS.

The preference(widget.windows.window_occlusion_tracking.enabled) affects only to Windows. It does not affect to non-Windows platforms.

Flags: needinfo?(sotaro.ikeda.g)

Thanks! As it looks like this feature already exists for a while and didn't cause any problems so far. As such we should go ahead and disable this preference for recommended preferences in Remote Agent and Marionette.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Blocks: webdriver:m5
Points: --- → 1
Whiteboard: [webdriver:backlog] → [webdriver:m5]
Priority: P3 → P1
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bb952bc13c55
[remote] Set widget.windows.window_occlusion_tracking.enabled to false for all remote protocols r=webdriver-reviewers,whimboo
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch

Is this something we need on ESR?

Flags: needinfo?(jdescottes)

Most impacted users should get the fix via the next geckodriver release, no need to uplift.

Blocks: 1794560
Flags: needinfo?(jdescottes)

(In reply to Julian Descottes [:jdescottes] from comment #9)

Most impacted users should get the fix via the next geckodriver release, no need to uplift.

I was wrong here, the fix is in Firefox itself. Considering the amount of reports was low and there is a known workaround it's still not necessary to uplift this one.

No longer blocks: 1794560
Whiteboard: [webdriver:m5] → [webdriver:m5], [webdriver:relnote]
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: