0
Set ParentObject=Browser("Title:=Sign-In").Page("Title:=Sign-In Home Page")
PropertyRequired="name"
PropertyValue="Agree and Login"
Result="yes"
Function WebButton(ParentObject,PropertyRequired,PropertyValue,Result)
Call ReportResult(Result)
Dim hit
hit=0
If PropertyRequired="" then
PropertyRequired="name"
End If
If ParentObject.WebButton(PropertyRequired &":="&PropertyValue).exist then
ParentObject.WebButton(PropertyRequired &":="&PropertyValue).click
hit=1
End if
If hit>0 then
Reporter.reportevent micpass,"The button: "&PropertyValue,"Clicked sucessfully"
else
Reporter.reportevent micpass,"The button: "&PropertyValue,"not Clicked sucessfully"
End if
End Function
當我調用此函數後,顯示錯誤「錯誤的參數數或無效的屬性分配」。錯誤的參數數量或hp無效的屬性分配錯誤UFT
Call WebButton(ParentObject,PropertyRequired,PropertyValue,Result)
沒有給予任何的行號?你能提供完整的代碼嗎? – vins 2015-04-01 20:12:08