操纵网页上的gui元素 [英] manipulating gui elements on a web page

查看:54
本文介绍了操纵网页上的gui元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是蟒蛇世界的新手。我正在尝试一项任务:


我正在尝试访问一个网站,比如说,http://xyz.com"然后尝试对页面上已经存在的gui元素进行分类。


我可以使用以下方式打开网站:


webbrowser.open (http://xyz.com"


但是现在,我必须在文本框中输入一些文本并单击按钮,我不知道该怎么做使用python。任何人都可以指导我完成吗?


TIA,

rdps

I am a newbie to the python world. I am trying my hands at one task:

I am trying to access a website, say, "http://xyz.com" and then trying to maniulate the gui elememts already present on the page.

I am able to open the site using:

webbrowser.open("http://xyz.com")

But now, i have to enter some text in a text box and click on the button, which i am unaware how to do using python. Can anyone guide me through?

TIA,
rdps

推荐答案

这是一个例子如何使用win32com打开谷歌页面并将python粘贴到文本字段中。

Here is an example of how to use win32com to open the google page and paste python into the text field.

展开 | 选择 | Wrap | 行号


谢谢确实很多!!!


可以用cPAMIE模块做同样的事吗?我在其他一些帖子中读到了这个模块。看起来更简单易用。使用cPAMIE模块会有一些缺点吗?请告诉我。
Thanks a lot indeed!!!

Can one use cPAMIE module to do the same stuff ? i read about this this module in some of the other posting. Is looks simpler to use. Could there be some disadvantages of using the cPAMIE module? Please do let me know.


我从未使用过cPAMIE,但从我能读到的内容来看,它似乎是一种比使用COM更容易控制Web浏览器的方法。它也是一个测试框架。因此,如果您的目的是测试Web解决方案,那么您应该尝试cPAMIE。它是免费的!谢谢rdps。我有空的时候也会看看cPAMIE。


祝你好运

/ Fredrik
I have never used cPAMIE, but from what I can read about it, it seems to be an easier way to control the web browser than to use COM. It is also a test framework. So if your intentions are to test a web solution you should defently try cPAMIE. And it''s free! Thank you rdps. I will also take a look at cPAMIE when I have the time.

Best regards
/Fredrik


这篇关于操纵网页上的gui元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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