Discussion:
[Pywinauto-users] PywinAuto Window Identification
shery info
2008-12-12 00:20:31 UTC
Permalink
HI,

I was trying to automate the SAP windows GUI application.

I have installed the python 2.4 with pywinauto 0.3.7 along with Ctypes and
Sendkeys. Setup was successful and example was running efficiently.

When I tried to open a SAP window, now i am confused how to get the name of
the window and also the objects in that window so that we can use the
properties of the same to automate the application.

Like we do in commericial vendor based software we have a object repository
in QTP and GUI Map files in winrunner which can specify what is the window
prop or objects in that window, but when using pywinauto how to do the
same.

Thanks
Shery
Mark Mc Mahon
2008-12-12 10:50:19 UTC
Permalink
Hi Sherry,

see my comments below
Post by shery info
HI,
I was trying to automate the SAP windows GUI application.
I have installed the python 2.4 with pywinauto 0.3.7 along with Ctypes and
Sendkeys. Setup was successful and example was running efficiently.
When I tried to open a SAP window, now i am confused how to get the name of
the window and also the objects in that window so that we can use the
properties of the same to automate the application.
Like we do in commericial vendor based software we have a object repository
in QTP and GUI Map files in winrunner which can specify what is the window
prop or objects in that window, but when using pywinauto how to do the
same.
I didn't go this way in pywinauto on purpose. You don't need to save a GUI
map before starting to use it. To get started you need to do something like

from pywinauto.application import Application as App
app = App("Title of SAP windows GUI application")

app.TitleofSAPwindowsGUIapplication.PrintControlIdentifiers()

This will print a lit of the control identifers for the dialog//window. It
does not print menu options though.

So if you wanted to open the Tools -> Options menu (I have no idea what the
SAP application has)
you would do
app.TitleofSAPwindowsGUIapplication.MenuItem("Tools -> Options").Select()

pywinauto - looks at the controls dynamically - so there is no need (and
it's currently not possible) to save a GUI Map before using it.
Post by shery info
Thanks
Shery
Hope this helps,
Mark

Loading...