Tuesday, 28 November 2017

Checkpoint for Verifying WebObjects

set opage1=Browser("Certificate Error: Navigation").Page("SafetyDirect : Login")
VerifyWebObj opage1,"WebEdit","ctl00\$ContentPlaceHolder1\$TextBoxUser"

Function VerifyWebObj(objpage,strobjclass,strobjname)

Dim WebObj
Set WebObj=Description.Create
WebObj("micclass").Value=cstr(strobjclass)
WebObj("name").Value=strobjname



set allwebobj=opage1.Childobjects(WebObj)
'msgbox allwebobj.Count

For i=0 to allwebobj.Count-1
If trim(allwebobj(i).Getroproperty("name"))=trim(strobjname) Then

VerifyWebObj=True
Reporter.ReportEvent micPass,"Checkpoint for "&strobjname," "&strobjname&" is Present on the webpage"
'msgbox "yes"
   
Else

 VerifyWebObj=False
   Reporter.ReportEvent micFalse,"Checkpoint for "&strobjname," "&strobjname&" is NOT Present on the
  ' msgbox "false"
  
End If
   
Next

End Function

No comments:

Post a Comment

Spring Boot : Exception Handler 14