How to control IE Explorer with pywinauto

╄→尐↘猪︶ㄣ 提交于 2019-12-02 12:09:54

问题


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.



来源:https://stackoverflow.com/questions/12773356/how-to-control-ie-explorer-with-pywinauto

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!