python - error using pywinauto -


I'm new to python and just install pywinauto by using easy_install.

I follow as a simple code:

pywinauto import application app = application from. Application.start ('notepad.exe') traceback (most recent call final): File "& lt; stdin & gt;", in line 1, & lt; Module & gt; AttributeError: Type object 'app' has no attribute 'Start'

As you are seeing I am getting an error I tried to find an answer for the web on this But I did not know why this is happening.

Please help in advance thanks.

VG

Pywinauto is very confused about the naming conventions (me I know - I had written it!).

There are two options:

a) Make an example of the first application class and then start the call ().

  & gt; & Gt; & Gt; Application from Pywinauto Import & gt; & Gt; & Gt; App = app ()> gt; & Gt; & Gt; App.start ('notepad.exe') & lt; Pywinauto.application.Application object at 0x022991B0 & gt; & Gt; & Gt; & Gt; App.UntitledNotepad.MenuItem ("File -> Exit"). Select ()   

b) Call the application. Start () class method (starts with upper 's')

  & gt; & Gt; & Gt; App = App. Start ('Notepad') & gt; & Gt; & Gt; App Missing absent notepad. ("file -> exit"). Select ()   

option b) is less typing :)

Comments