DPI compatibility issue when try method in "execute_script"
When my windows DPI is 100%, I could rightClick success, while it failed when my windows DPI is 150%, it seems the "rightClick" action worked on the false (x, y)
my code:
self.driver.execute_script('windows: click', {"elementId": self.wait_locator(loc).id, "button": "right"});
at the same time, I have tried other "execute_script" method, including: windows: scroll, windows: hover, "windows: click". All these method have this issue
DPI Setting: Setting > System > Display > Scale
by the way, no matter what DPI, driver.findElement().click() could always click in the true place
It is currently expected to not work with scaled screen.
This driver gets orientation info via WinAppDriver, so if it returns the scaled value, we can support it. But the WAD doesn't support it for now. https://github.com/appium/appium-windows-driver/blob/e4849fb2b42f1e3c04868a05a1ef3b807fee13c5/lib/commands/gestures.js#L87-L95
If you have an idea to get a proper coordinate programmatically, we could add such a calculation in this driver layer from the WAD response. Not the element id, but for example x/y addresses:
The screen scale (if customized) is not taken into consideration while calculating the coordinate.
https://github.com/appium/appium-windows-driver?tab=readme-ov-file#windows-click