Function ClickOnImage(byval objPageName, byval PropertyName, byval propertyvalue, byval Index)
Set ObjPage= objPageName
If Index ="" Then
If ObjPage.Image(PropertyName&":="&propertyvalue).exist(10) then
ObjPage.Image(PropertyName&":="&propertyvalue).highlight ' comment later
ObjPage.Image(PropertyName&":="&propertyvalue).click
Reporter.ReportEvent 4, "ClickOnImage", "Checking for lmage"& propertyvalue
Reporter.ReportEvent micPass,"ClickOnImage","Image with Property " & PropertyName & "Property Value " & propertyvalue & "Found"
Reporter.ReportEvent micPass,"ClickOnImage","Image with Property " & PropertyName & "Property Value " & propertyvalue & "Clicked"
ClickOnImage =0
Else
Reporter.ReportEvent 4, "ClickOnImage", "Checking for Image"& propertyvalue
Reporter.ReportEvent micFail,"ClickOnImage","Image with Property " & PropertyName & "Property Value " & propertyvalue & "was not Found or available"
ClickOnImage = 1
End if
else
If ObjPage.Image(PropertyName&":="&propertyvalue, "Index:="&Index).exist(10) then
ObjPage.Image(PropertyName&":="&propertyvalue, "Index:="&Index).click
Reporter.ReportEvent 4, "ClickOnImage", "Checking for lmage "& propertyvalue
Reporter.ReportEvent micPass,"ClickOnImage","Image with Property " & PropertyName & "Property Value" & propertyvalue & "Found"
Reporter.ReportEvent micPass,"ClickOnImage","Image with Property " & PropertyName & "Property Value " & propertyvalue & "Clicked"
ClickOnImage =0
Else
Reporter.ReportEvent 4, "ClickOnImage", "Checking for lmage"& propertyvalue
Reporter.ReportEvent micFail,"ClickOnImage","Image with Property " & PropertyName & "Property Value" & propertyvalue & "was not Found or available"
ClickOnImage = 1
End if
End If
End function
No comments:
Post a Comment