|
希望对你有帮助。
Function gbExecuteData(oFrame)
objNames = DataManager.GetObjNames
For i = 0 To Ubound(objNames)
sObjName = objNames(i)
sObjValue = DataManager.GetValue ( sObjName )
sObjType = DataManager.GetType( sObjName )
Select Case sObjType
Case "WebEdit" ' (WebEdit)
If Not oFrame.WebEdit(sObjName).Exist(HT) Then
Call ExcelReport("Warning", "gbExecuteData","Can't Find "&sObjName&" WebEdit ")
gbExecuteData = False
Else
oFrame.WebEdit(sObjName).Set sObjValue
Call ExcelReport("Pass","gbExecuteData","Set "&sObjName&" WebEdit "&sObjValue&" Succ!" )
End If
Case "WebButton" 'WebButton
If Not oFrame.WebButton(sObjName).Exist(HT) Then
Call ExcelReport("Warning", "gbExecuteData","Can't Find "&sObjName&" WebButton ")
gbExecuteData = False
Else
oFrame.WebButton(sObjName).Click
Call ExcelReport("Pass","gbExecuteData","Click "&sObjName&" WebButton "&sObjValue&" Succ!" )
End If
Case Else
Call ExcelReport("Warning", "gbExecuteData","Object Type Error, Object Type "&sObjType&" not surpport yet")
End Select
Next
End Function |
|