星期六, 十二月 09, 2006

twill: a simple scripting language for Web browsing

twill,一个模拟浏览器行为的脚本,很有趣。

你可以先安装他
easy_install twill

示例代码:
go http://www.sina.com.cm/
show
showforms
showhistory

Python API
from twill.commands import *
go("http://www.python.org/")
showforms()

参考资料:
http://twill.idyll.org/
http://twill.idyll.org/python-api.html
http://agiletesting.blogspot.com/2005/09/web-app-testing-with-python-part-3.html

标签: ,

1 Comments:

Blogger roy said...

如果是给一个url使用post方式发送数据,应该怎么写呢?有很多网站的留言表单是用js生成的,在页面上并没有form生成。

4:57 下午  

发表评论

<< Home