-->

How to control IE Explorer with pywinauto

2019-03-06 15:32发布

问题:

Ok, so I want to control a IE Explorer with pywinauto. I would like to select text fields on the page and edit them. Is there a way to do this with pywinauto without clicking where the text field are? The pages will be the same every time, but not the data that is entered into them. The window may not be in the same place every time, so I couldn't do WrapperObject.Click(coords=fixed_pos). Sample code is preferred. Thanks!

回答1:

Unfortunately no. You can control the window of IE, all the toolbars and buttons, address bar and search bar, etc. But not content of pages within.

For this task, you need other tools, such as Selenium http://seleniumhq.org/

As for pywinauto,I strongly recommend to use the utility SWAPY http://code.google.com/p/swapy/. I am the Author of SWAPY. With it you can easily determine whether it is possible to manage the a control with pywinauto or not.