WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

How to print the Winapp driver console log to a text file .. in case element not found it just says not found without proper info of which element not found . The information is visible in Winappdriver exe console but unable to print it in test logs . Any thoughts ??

Open avi8045 opened this issue 2 years ago • 4 comments

How to print the Winapp driver console log to a text file .. in case element not found it just says not found without proper info of which element not found . The information is visible in Winappdriver exe console but unable to print it in test logs . Any thoughts ??

avi8045 avatar Aug 24 '23 13:08 avi8045

Have you tried printing the stack trace?

anunay1 avatar Aug 24 '23 15:08 anunay1

Stacktrace just shows that element not found .. but it doesnot say which element it is . That information is available in the Winappdriver console window but unable to write it in logs.

avi8045 avatar Aug 25 '23 04:08 avi8045

You would need to process the console output please Google!!!

anunay1 avatar Aug 25 '23 14:08 anunay1

avi8045 Also you can create a wrapper for control and print control locator on error: something like that https://www.ontestautomation.com/using-wrapper-methods-for-better-error-handling-in-selenium/#:~:text=Extending%20your%20wrapper%20methods%3A%20logging

Shakevg avatar Aug 26 '23 08:08 Shakevg