Monday, 22 July 2013

QTP : Search & Click on a Image Using Descriptive Programming

Code is as follows -

Set IMGCollection = Browser().Browser().Object.getElementsByTagName(”IMG”)
TotalIMGCount = ImageCollection.length
     For i = 0 to (TotalIMGCount -1)
         If IMGCollection(i).src = “https://www…abc.png” Then
                  IMGCollection(i).click
                  Exit For
          End If
      Next

No comments:

Post a Comment