Summary
The windows: hover command successfully triggers hover interactions, but the cursor position appears incorrect when Windows display scaling is set to 125%.
At 100% scaling the hover works correctly. At 125% scaling the cursor lands at an offset position relative to the target element.
Environment
- Appium Windows Driver: 5.x (please replace with your exact version)
- Appium Server: 2.x (please replace with your version)
- Windows 11
- Display Scaling: 125%
- Test Framework: NUnit
- Application Under Test: .NET MAUI Windows App
Related Issue
MAUI Issue:
dotnet/maui#35522
The MAUI team suggested using windows: hover, which successfully triggers PointerEntered, but DPI scaling appears to affect coordinate calculation.
Reproduction
windowsDriver.ExecuteScript("windows: hover", new Dictionary<string, object>
{
["startX"] = 0,
["startY"] = 0,
["endElementId"] = element.Id,
["durationMs"] = 700
});
Expected Behavior
The cursor should move to the correct location of the target element regardless of Windows display scaling settings.
Actual Behavior
- Works correctly at 100% scaling.
- At 125% scaling the hover location is offset from the target element.
- As a result, hover-dependent UI behavior may not be triggered reliably.
Additional Information
This appears to be related to DPI scaling / coordinate translation rather than the application itself.
Has this behavior been observed before, and is there a recommended workaround for high-DPI environments?
Summary
The
windows: hovercommand successfully triggers hover interactions, but the cursor position appears incorrect when Windows display scaling is set to 125%.At 100% scaling the hover works correctly. At 125% scaling the cursor lands at an offset position relative to the target element.
Environment
Related Issue
MAUI Issue:
dotnet/maui#35522
The MAUI team suggested using
windows: hover, which successfully triggersPointerEntered, but DPI scaling appears to affect coordinate calculation.Reproduction
Expected Behavior
The cursor should move to the correct location of the target element regardless of Windows display scaling settings.
Actual Behavior
Additional Information
This appears to be related to DPI scaling / coordinate translation rather than the application itself.
Has this behavior been observed before, and is there a recommended workaround for high-DPI environments?