在使用描述性编程前,可以先使用QTP的spy获取对象标识
Public Function ChangePage_RoleInfo_2(byval smsUrl, byval a1, byval b2)
Dim SYLogin, SYDialog
Set SYLogin=Browser(“name:=系统服务总线”).Page(“title:=系统服务总线”)’系统框架
Set SYDialog=Browser(“name:=系统服务总线”).Dialog(“text:=Windows Internet Explorer” , “nativeclass :=#32770”)’弹出对话框
SYLogin.webTable(“column names:=权限管理” , “html id=MenuSection” , “name:=down”).WebElement( “html tag := A” , “outertext :=角色信息维护”).Click
wait 3
SYLogin.webEdit(“class := toPage”, “html id:=operTabel_ssbInputToPage”, “name:=WebEdit”).set “0”
SYLogin.WebButton(“class:=showPage” , “html id:=showPage”, “name:=Go”).Click
wait 2
SYLogin.webEdit(“class := toPage”, “html id:=operTabel_ssbInputToPage”, “name:=WebEdit”).set “0.3”
SYLogin.WebButton(“class:=showPage” , “html id:=showPage”, “name:=Go”).Click
wait 2
SYLogin.webEdit(“class := toPage”, “html id:=operTabel_ssbInputToPage”, “name:=WebEdit”).set “5”
SYLogin.WebButton(“class:=showPage” , “html id:=showPage”, “name:=Go”).Click
wait 2
RecordTestResult “changePage_RoleInfo_2”, “Pass”, “NONE”
End Function