`

python 调用httpwatch api范例

阅读更多
运行环境:
这里以windows xp为例:

httpwatchpro-v7.2.23

ActivePython-v2.7.2.5

import win32com.client
__author__ = 'sun'

# Create a new instance of HttpWatch in IE
control = win32com.client.Dispatch('HttpWatch.Controller')
plugin = control.IE.New()

# Start Recording HTTP traffic
plugin.Log.EnableFilter(False)
plugin.Record()

# Goto to the URL and wait for the page to be loaded
plugin.GotoURL("http://www.baidu.com/")
control.Wait(plugin, -1)

# Stop recording HTTP
plugin.Stop()

if plugin.Log.Pages.Count != 0 :
    print "\nPage Title: '", plugin.Log.Pages(0).Title , "'"
    # Display summary statistics for page
    summary = plugin.Log.Pages(0).Entries.Summary
    print "Total time to load page (secs):      ", summary.Time
    print "Number of bytes received on network: ", summary.BytesReceived
    print "HTTP compression saving (bytes):     ", summary.CompressionSavedBytes
    print "Number of round trips:               ", summary.RoundTrips
    print "Number of errors:                    ", summary.Errors.Count

# Close down IE
plugin.CloseBrowser()


输出结果:
C:\Python27\python.exe x:/xxx/httpwatchExample.py

Page Title: '百度一下,你就知道'
Total time to load page (secs):       0.463
Number of bytes received on network:  3748
HTTP compression saving (bytes):      4821
Number of round trips:                1
Number of errors:                     0


分享到:
评论

相关推荐

    httpwatch的api

    做性能测试或者开发的童鞋可以尝试使用,可以很方便的监控到响应时间、资源下载等

    C# HttpWatch Demo 分析网页数据包

    调用httpwatch API HttpWatch是强大的网页数据分析工具.集成在Internet Explorer工具栏.包括网页摘要.Cookies管理.缓存管理.消息头发送/接受.字符查询.POST 数据和目录管理功能.报告输出.HttpWatch 是一款能够收集并...

    httpwatch分析网站调用链接

    能记录访问网址所调用的链接,很适合做url网站限制之前的分析工作 绿色无广告,有操作文档。

    HttpWatch抓取

    使用与ie7,ie8,ie9和firefox的Http协议抓取包小工具。

    httpWatch自动化测试工具

    自己写的一个httpWatch自动化测试...用户只要安装HttpWatch,并且运行本工具,即可调用httpwatch,自动测试网站,并将测试结果(测试结果_**.hwl)保存下来,开发人员拿到测试结果就可以很方便地查找、分析、定位问题。

    httpwatch_httpwatch_抓包_

    httpwatch源码,网络抓包工具源码。

    HttpWatch

    HttpWatch,一个不错的开发辅助工具

    httpwatch httpwatch

    HttpWatch是强大的网页数据分析工具.集成在Internet Explorer工具栏.包括网页摘要.Cookies管理.缓存管理.消息头发送/接受.字符查询.POST 数据和目录管理功能.报告输出.HttpWatch 是一款能够收集并显示页页深层信息的...

    httpwatch 协议查看器

    httpwatch httpwatch httpwatch httpwatch httpwatch httpwatch

    httpwatch下载

    HttpWatch是强大的网页数据分析工具.集成在Internet Explorer工具栏.包括网页摘要.Cookies管理.缓存管理.消息头发送/接受.字符查询.POST 数据和目录管理功能.报告输出.HttpWatch 是一款能够收集并显示深层信息的软件...

    httpwatch

    httpwatch-网页监视工具

    httpwatch9.1带破解

    httpwatch9.1带破解;httpwatch9.1带破解;httpwatch9.1带破解;httpwatch9.1带破解

    httpwatch破解版9.4.zip

    HttpWatch 网页数据分析工具,可分析打开网页时网页上每个元素所用的时间以及具体的交互记录,包括Cookies、消息头、字符查询等信息,是分析网站服务器性能的必备工具 HttpWatch 用来分析、优化网页结构非常不错,...

    httpwatch安装包

    httpwatch安装包

    Httpwatch Httpwatch浏览器插件。请求和响应

    Httpwatch浏览器插件。请求和响应 Httpwatch浏览器插件。请求和响应

    httpwatch最新注册版

    httpwatch最新注册版,httpwatch最新注册版,http协议分析的利器

    httpwatch7.1

    httpwatch httpwatch7.1 亲测好用,备份,带离线注册文件

    HttpWatch+Professional

    HttpWatch+Professional+v6.0.14授权文件可用

    httpwatch和Firefox

    刚好相互适配的httpwatch和Firefox,自己已经尝试了,提醒一下,要记得卸载干净自己电脑原本的httpwatch和Firefox。

Global site tag (gtag.js) - Google Analytics