Tuesday, 28 November 2017

Checkpoint: Find Webelement

set opage=Browser("Certificate Error: Navigation").Page("SafetyDirect : Login")

Function VerifyWebElement(objpage,strwebelement)

Dim owebelement
Set owebelement=Description.Create
owebelement("micclass").Value="WebElement"
owebelement("innertext").Value=strwebelement
 
set allwebelement=opage.Childobjects(owebelement)
For i=0 to allwebelement.Count-1

If trim(allwebelement(i).Getroproperty("innertext"))=trim(strwebelement) Then
   
VerifyWebElement=True
Reporter.ReportEvent micPass,"Checkpoint for "&strwebelement," "&strwebelement&" is Present on the webpage"

   
Else

  VerifyWebElement=False
  
End If
   
Next
End Function

No comments:

Post a Comment

Spring Boot : Exception Handler 14