Search code examples
pywinauto

Action logging in pywinauto


Just like in case of UFT where it logs all actions with timestamp, how do I enable logging for actions that pywinauto performed on the application so that it automatically generates a log? This is specially useful in case of debugging the pywinauto code. Currently i have used print statement to log to file.


Solution

  • Every action should be logged if you have logging config and run the following code before the tests:

    from pywinauto import actionlogger
    actionlogger.enable()
    

    If you see some action is not logged, please report a bug on GitHub.