I am newer to pywinauto, my company develop first windows application.I am using pywinauto to implement automated testing, but i encounter serious problems, it breaks me go further. my question is how to know methods of every object. for example as blow code form pywinauto official site
>>> from pywinauto import application
>>> app = application.Application.start("notepad.exe")
how i can konw app.Notepad has method MenuSelect() and app has method SaveAs? as you see the dir(app.Notepad) can know whose method.
Thanks in advanced!
I would suggest two things…
a) look at the docs (hopefully not too far out of date)
>>> dir (app.Notepad.WrapperObject()))
The reason that app.Notepad doesn't return a useful list of methods is because it is an intermediate object. It is a WindowSpecification, it doesn't represent a window as such - but the specification of a window, and as such until you run HwndWrapper action on it - you are not sure which type of object it is.
Hope this helps,
Log in to post a comment.