microsoft / WinAppDriver

Windows Application Driver
MIT License
3.63k stars 1.4k forks source link

Scripts fails when Machine font size is increased from 125% to 150% #260

Open Manvibha opened 6 years ago

Manvibha commented 6 years ago

Hi Timotius/Yosef

I experienced automation script failures when machine font size is increased from 125% to 150%. This issue popped out when my team had a machine with font size set to 150% and started experiencing the issue. After more investigation found the root cause for failure and suggested to change the font size to 125% ; later it worked perfectly. It should have not failed since it does not relay on XY coordinates since controls are identified using unique ID's.

Text size 150%: driver.FindElementByAccessibilityId("loginbtn").click()

Tries to click on login button, however, click is happening just top side of button and no action if performed with that click since button click has to be at center. This scenario holds good when I try to execute scripts on bigger monitor like extended monitor with same resolution of laptop.

Details: Application : WPF Driver : Wniappdriver v1.0 - latest version and did not work with earlier version too Machine : windows 10

Let me know, if there is any workaround for such issue.

regards, Mahendra

khouzam commented 6 years ago

Thanks for reporting this @Manvibha

We're looking into this.

dhapolapankaj commented 6 years ago

Hi @khouzam

Do you think it would be worthwhile to update some basic settings in Windows when we Install WinAppDriver in Windows system. Basic settings like turning on the developer mode, setting the right resolution etc. Else whenever we start WinAppDriver.exe, before start listening over a port WinAppDriver should perform basic checks and then display message if any basic settings are missing.

Regards PD

khouzam commented 6 years ago

Hi @Manvibha

Do you have a repro case we could take a look at? We're supposed to be clicking in the middle of a button.

@dhapolapankaj regarding provisioning of the system, I'm thinking that this would be the responsibility of the machine owner, not of WinAppDriver. I personally would not want to have my resolution and settings changed when WinAppDriver is installed.

Manvibha commented 6 years ago

It happens on all the controls when text size is increased to 150% from 125%. Login into app failed due to this. My scripts were designed with the default Text size 125%. When Text size is increased to 150% , scripts started failing. Click does not happen on middle of control, it happens just top side of button. Hope this info helps to repro.

@khouzam , I agree with you that click should happen at the middle of control, which is not happening when Text size is altered. May be there is some other problem when Text size is changed. @dhapolapankaj , It is not a good idea to set the machine resolution via WinAppDriver installation. if control is identified by unique properties, then irrespective of resolution script should work.

regards, Mahendra

Manvibha commented 6 years ago

Any updated on this BUG? I am having trouble executing scripts on Azure VM's via automation build due to the same issue. And on VM changing screen resolution is disabled/restricted since it is VM. This is a show stopper for my test automation.

Regards, Mahendra

Manvibha commented 6 years ago

@khouzam , @timotiusmargo

Do we have any update on this bug?? when we can expect fix this bug ?

Thanks, Mahendra

Manvibha commented 6 years ago

Hello,

Any update on this bug? Waiting eagerly for a fix!

regards, Mahendra

hassanuz commented 6 years ago

Hi @Manvibha ,

Thanks for following up. We're investigating into this further and will let you know if we are able to find anything.

Manvibha commented 6 years ago

Hello,

Let me know if we can have a skype call , so that i can show you actual behavior which would help to find root cause for the issue.

Manvibha commented 6 years ago

Any update on this issue?

vishnu45 commented 6 years ago

@Manvibha i ran into a similar issue, where i was trying to click an element which showed up using inspect tool. If i have a lesser zoom, ex: 75% it clicks, but at 125% it clicks somewhere else. However, when further troubleshooting i figured it was coz the element itself was not visible on screen (at a higher zoom level). So whenever the element is not visible its x coordinate would be < 0 (check inspect tool). How I solved this issue was scrolling through my application until it became visible (x > 0).

Manvibha commented 6 years ago

Thanks for response!

But issue that I have brought up, happens on all the controls when text size is increased to 150% from 125%. Especially on Azure Vm's none of my automation scripts works due to this issue. Workaround is always I need to change the display setting of RDP to 1920X1080 pixels.. It is very cumbersome to do this setting always before triggering scripts on Azure VM's.. I am worried , yet no update on this issue for a very long time (8 months from now).

regards, Mahendra

Manvibha commented 6 years ago

can I have someone's attention to this issue please???

hassanuz commented 6 years ago

Hi @Manvibha,

Thanks for being patient - we're aware of this bug, and are following up to have it be resolved in a future release.

Manvibha commented 6 years ago

thanks for response!