|
QTP录制用户登陆为什么用户名参数化后第一行总不执行?
执行到最后还给出错误.Cannot identify the object "username" (of class WebEdit). Verify that this object's properties match an object currently displayed in your application.
Line (11): "Browser("Rapid Manager").Page("Rapid Manager_2").WebEdit("username").Set DataTable("username", dtLocalSheet)".
我的总脚本是这样的:
Dim i
Dim output
Dim input
For i=1 to datatable.GetSheet("Action1").getrowcount
output=datatable("outputvalue",dtLocalSheet)
input=datatable("status",dtLocalSheet)
If output<>input Then
reporter.ReportEvent micFail, "login test", "预期值与;实际值不一致"
End If
datatable.GetSheet("Action1").setnextrow
Browser("Rapid Manager_2").Page("Rapid Manager_2").WebEdit("username").Set DataTable("username", dtLocalSheet)
Browser("Rapid Manager_2").Page("Rapid Manager_2").WebEdit("password").SetSecure DataTable("password", dtLocalSheet)
Browser("Rapid Manager_2").Page("Rapid Manager_2").WebButton("Login").Click
Browser("Rapid Manager_2").Page("Rapid Manager").Output CheckPoint("Rapid Manager")
Next
Browser("Rapid Manager_2").Page("Rapid Manager_2").Link("Logout").Click
希望高手能帮忙看看,我是刚开始学习
谢谢 |
|