书到用时方恨少

QTP之DataTable使用--循环

上一篇 / 下一篇  2009-10-17 17:00:47 / 个人分类:QTP

1: 设置file-settings-test settings-run-run one iteration only

Dim i ,j

j = DataTable.GetRowCount
For i=1 to j
     Browser("Browser").Page("日志 - XXX").Link("写新日志").Click
        Browser("Browser").Page("写日志 - XXX").WebEdit("title").Set DataTable("title", dtGlobalSheet)
        Window("Windows Internet Explorer").Activate
        Window("Windows Internet Explorer").WinObject("Internet Explorer_Server").Click 515,332
        Window("Windows Internet Explorer").WinObject("Internet Explorer_Server").Type DataTable("content", dtGlobalSheet)
        Window("Windows Internet Explorer").WinObject("Internet Explorer_Server").Type  micReturn
        Window("Windows Internet Explorer").WinObject("Internet Explorer_Server").Click 466,243
        Window("Windows Internet Explorer").WinObject("Internet Explorer_Server").Type DataTable("content2", dtGlobalSheet)
        Browser("Browser").Page("写日志 - XXX").WebButton("发 表").Click
       Datatable.GetSheet("Global").setnextrow
Next

备注:当前内容框控件无法识别,采用了LowLevelRecording

用于:插入大量的日志


TAG: DataTable 循环 QTP qtp

xina的个人空间 引用 删除 xina   /   2009-10-20 10:55:18
非常感谢!!
 

评分:0

我来说两句

Open Toolbar