动态更改HTML源 [英] Dynamically Alter HTML Source

查看:81
本文介绍了动态更改HTML源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇,是否有一种方法可以自动从网页上动态更改源代码.

I am curious if there might be a way to dynamically alter source from a web page automatically.

例如,我知道Firefox的firebug插件可以修改源并实时查看反应.因此,说我要登录到特定表单.我可以使用登录名和密码更改此动态源,然后通过一些自动脚本进入有问题的网站吗?如果没有,那么这种方法是否还有其他可能更好的替代方法?

For instance, I know the firebug plugin for Firefox allows the capability to modify the source and see the reaction in real-time. So, say I want to login to a particular form. Could I alter this dynamic source with a login name and password and enter the website in question via some automated script? If not, are there any potential alternatives to this approach that may fair better?

谢谢.

推荐答案

如果您想要可以使IE浏览器自动化的工具,我可以向您推荐的是: Watir WatiN . Watir用红宝石开发,而WatiN用c#开发.它们都非常强大,足以满足您的要求.

If you want something which can automate IE browser, what I can recommend to you is: Watir and WatiN. Watir is developed in ruby while WatiN is developed in c#. They are both quite powerful, more than enough to meet your requirements.

如果必须使用Python脚本.那么我会推荐C#+ WatiN + IronPython.您可以编写python脚本来调用WatiN的dll.请注意,IronPython与Python不同,它基于Microsoft的.net框架.目前,我不知道有什么可以和WatiN和Watir一样的纯python产品.

If you have to use Python script. then I would recommend C# + WatiN + IronPython. You can write python scripts to call WatiN's dll. Please note that, IronPython is not the same as Python, it is based on microsoft's .net framework. Currently I don't know any pure python product which can do the same as WatiN and Watir.

这篇关于动态更改HTML源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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