WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

There is problem with the WinAppDriver finding the right elements on Virtuell Machine

Open Saif4 opened this issue 6 years ago • 4 comments

Sometimes when I run my tests on VM the WinAppDriver does not find the correct element, It finds something random but very close to my element that I want, is someone else has experienced this issue? It only happens on VM

Saif4 avatar Dec 12 '19 08:12 Saif4

How do you locate the elements? Are you using xpath? Do you wait enough time for the UI to be updated complete? You may get PageSource each time you are locating the concerned element, then to see if you can find something interesting.

licanhua avatar Dec 13 '19 22:12 licanhua

I use Name or AutomationID and I have enough time to wait,. The driver finds the right element because it will fails either way. For exempel if I have a drop down with 3 alternatives and I want to select the middle one, but sometimes its finds the first or the third instead. Next time I run the test it works.

Saif4 avatar Dec 16 '19 08:12 Saif4

I see the same issue, if my widgets do not comply to good UX designs (I test it with https://accessibilityinsights.io/docs/en/windows/overview to find discrepancies). winappdriver may be extremely slow to find stuff and often return something that fails. After we started using accessibilityInsights in development to test widgets, this issue is minimized. I use python and find winappdriver to be horrendously slow compared to commercial products like Smartbears TestComplete.

fenchu avatar Dec 17 '19 12:12 fenchu

A quick fix is I restart my VM and everything works again. ¯_(ツ)_/¯

Saif4 avatar Dec 18 '19 10:12 Saif4