qtp循环问题
DimiFori=1to5DataTable.SetCurrentRow(i)SystemUtil.Run"C:\ProgramFiles\HP\QuickTestPro...
Dim i
For i=1 to 5
DataTable.SetCurrentRow(i)
SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
Dialog("Login").WinEdit("Agent Name:").Set DataTable("agentname", dtLocalSheet)
Dialog("Login").WinEdit("Password:").Set DataTable("password", dtLocalSheet)
Dialog("Login").WinButton("Cancel").Click
Next
datatable表中测试用例就5行,每次循环都把所有的用例执行一遍,也就是说循环了五次,测试用例被遍历了五次,怎么解决?我只想每循环一次只读取一行测试用例 展开
For i=1 to 5
DataTable.SetCurrentRow(i)
SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
Dialog("Login").WinEdit("Agent Name:").Set DataTable("agentname", dtLocalSheet)
Dialog("Login").WinEdit("Password:").Set DataTable("password", dtLocalSheet)
Dialog("Login").WinButton("Cancel").Click
Next
datatable表中测试用例就5行,每次循环都把所有的用例执行一遍,也就是说循环了五次,测试用例被遍历了五次,怎么解决?我只想每循环一次只读取一行测试用例 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询