如何使用pywinauto控制IE Explorer [英] How to control IE Explorer with pywinauto

查看:625
本文介绍了如何使用pywinauto控制IE Explorer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我想用pywinauto控制一个IE浏览器。我想在页面上选择文本字段并进行编辑。有没有办法用pywinauto执行此操作而不单击文本字段的位置?每次页面都是相同的,但不是输入的数据。窗口可能不是每次都在同一个地方,所以我不能做 WrapperObject.Click(coords = fixed_pos)。示例代码是首选。谢谢!

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!

推荐答案

不幸的是没有。您可以控制IE的窗口,所有工具栏和按钮,地址栏和搜索栏等。但不包含页面内容。

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.

对于此任务,您需要其他工具,例如Selenium http://seleniumhq.org/

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

至于pywinauto,我强烈建议使用实用程序SWAPY http://code.google.com / p / swapy / 。我是SWAPY的作者。有了它,您可以轻松确定是否可以使用pywinauto管理控件。

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.

这篇关于如何使用pywinauto控制IE Explorer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆