You can try the below snippet along with report event, the code captures and highlights the mismatched text in the webpage.
Set obj=Browser("name:=Google").Page("title:=Google").Object.getElementsByTagName("LABEL")(0)If your text is mismatched in the webpage, the script captures bitmap of the page.
vStrActualText= obj.innerText
vStrExpectedText="The Web"
If vStrActualText<>vStrExpectedText Then
obj.innerHTML=""&vStrActualText&""
Browser("name:=Google").Page("title:=Google").highlight
Browser("name:=Google").Page("title:=Google").CaptureBitmap "C:\TEST.PNG",True
obj.innerHTML=vStrActualText
End If
No comments:
Post a Comment