Skip to content

windows: hover uses incorrect coordinates when Windows display scaling is set to 125% #358

Description

@SadiaNawaaz

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions