Objective: Understand Accessibility behavior of MS Teams on Dual Monitor, with Monitors setup at different scales, example 100% and 125%, with 1920*1080 resolution. The tool I use is Accessibility Insight as well as I have tried to check the results with Automation API
Problem: I understand MS Teams is a Per Monitor DPI Aware App and so is Accessibility Insight, however, .Accessibility Insight (and Windows Automation API hosted in a sample App that runs in Per Monitor DPI Aware mode) is unable to locate the MS Teams' Elements correctly when I launch Teams App in Monitor with 100% scale, which is also my Primary Monitor, and move it to the monitor with 125% scale. Both the Monitors are 14 inches to keep Monitors' Physical size variable out of the equation for now.
When I try to locate "Search" box on Title Bar of Teams, the Bounding Rectangle I see has Left as 2935 and Top as 280. Left value of 2935, when scaled down by 1.25 to adjust the scaling factor, gives 2348 which is the same value that I get from Physical Location of Mouse when I keep the mouse at Top-Left corner of the Search box and run my sample App in System DPI Aware or DPI Unaware mode. I cannot draw any correlation related to Top value of 280.
Further, Teams responds well on single Monitor with any scale factor or resolution.
What I Read/Understand: If I enable GDI scaling, reading Improve High DPIExperience, I do see that Accessibility Insight is able to locate the Element as it should. Further, Accessibility Insight works well on "Display Settings" itself (SystemSettings.exe process), which is also Per Monitor Aware.
Output from sample App that runs in Per Monitor Awareness and host Automation API. If I run the App in System DPI Aware or DPI Unaware mode, the Physical Mouse Coordinate of X axis returned is 2348 which is 2935/1.25. However, Y and Top values have no correlation whatsoever,
Questions:
Would it be a fair presumption to make that MS Teams, although is Per Monitor DPI Aware, doesn't work as it should on Dual/multi Monitors with different scale factors?
Is there anyway to get Accessibility Insight (and Automation API) to work correctly on MS Teams without changing the GDI Scaling/Overriding High DPI Scaling of MS Teams?
Is there a challenge itself with Accessibility Insight running on Electron Application? I observe similar challenge with Slack.