We are using WinApp Driver to write automation test for Visual studio extension (As per Microsoft documentation this is the successor of coded UI). And all tests are written in c#. We are facing some blocking issues when using it to automate VS 2019, we didn't face these issues during our research on VS 2017. We suspect its due to VS 2019 onward Microsoft enforcing Asynchronous autoload behavior for all Visual Studio extensions. And maybe we have to adopt different pattern for the automation. However we were not able to find related article for prove this fact.
Below are the blocking issues we are facing while using WinAppDriver (v1.2). Please note there are no build errors in the code and all the necessary elements are captured and included as well.
"{"status":13,"value":{"error":"unknown error","message":"Operation timed out. (Exception from HRESULT: 0x80131505)"}}"
session timed out
"System.NullReferenceException: Object reference not set to an instance of an object."
The above errors come up 8 out of every 10 times we run the automation code and stops the execution. This is makes WinApp driver very unreliable, we need to resolve this issue before we add test automation as part of pipeline.
We have posted about these issues on various dev forums including https://github.com/microsoft/WinAppDriver/issues/ and Microsoft/extendvs - Gitter, but we did not get a proper solution.
It would be much appreciated if you could shed some light on this. Thank you in advance.
User contributions licensed under CC BY-SA 3.0