51Testing软件测试论坛

标题: UFT12录制了Web,需要输入1-5递增,如何实现? [打印本页]

作者: 测试积点老人    时间: 2020-7-2 14:03
标题: UFT12录制了Web,需要输入1-5递增,如何实现?
UFT12录制了Web,需要输入1-5递增,如何实现?for语句只是简单的重复5次而已,输入值始终是1。
  1. Window("Mozilla Firefox").Click 114,170 [url=home.php?mod=space&uid=40658]@@[/url] hightlight id_;_527816_;_script infofile_;_ZIP::ssf30.xml_;_
  2. Window("Mozilla Firefox").Click 130,281 @@ hightlight id_;_527816_;_script infofile_;_ZIP::ssf31.xml_;_
  3. Window("Mozilla Firefox").Click 125,353 @@ hightlight id_;_527816_;_script infofile_;_ZIP::ssf32.xml_;_
  4. Window("Mozilla Firefox").Click 255,523 @@ hightlight id_;_527816_;_script infofile_;_ZIP::ssf33.xml_;_
  5. For Iterator = 1 To 5 Step 1
  6. Window("Mozilla Firefox").Click 400,189 @@ hightlight id_;_527816_;_script infofile_;_ZIP::ssf34.xml_;_
  7. Window("Mozilla Firefox").Click 270,265 @@ hightlight id_;_527816_;_script infofile_;_ZIP::ssf35.xml_;_
  8. Window("Mozilla Firefox").Click 791,296
  9. Window("Mozilla Firefox").Type "1"   
  10. Window("Mozilla Firefox").Click 786,412 @@ hightlight id_;_527816_;_script infofile_;_ZIP::ssf38.xml_;_
  11. Window("Mozilla Firefox").Type "1.1.1.1" @@ hightlight id_;_527816_;_script infofile_;_ZIP::ssf39.xml_;_
  12. Window("Mozilla Firefox").Click 914,677 @@ hightlight id_;_527816_;_script infofile_;_ZIP::ssf40.xml_;_
  13. NEXT @@ hightlight id_;_527816_;_script infofile_;_ZIP::ssf37.xml_;_
复制代码



作者: 海海豚    时间: 2020-7-3 09:25
for 语句没什么问题,问题是你这个脚本如果多次执行的话那每次都会从1开始
作者: qqq911    时间: 2020-7-3 10:14
做参数化
作者: bellas    时间: 2020-7-3 10:35
循环
作者: 郭小贱    时间: 2020-7-3 11:37
递增+1
作者: jingzizx    时间: 2020-7-3 13:05
+1




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2