Monday, August 29, 2011

How to get Tool tip of Images in a web page?

Now it's very easy to get tool tip from an images in the web pages, by using the below script.
Browser("abc").Page("abc").Sync
Set desc_img = Description.Create
desc_Img("html tag").value = "IMG"
Set list_imgs= Browser("abc").Page("abc").ChildObjects(desc_img)
   For i = 0 To list_imgs.Count - 1
     tool_tiptxt= list_imgs(i).GetROProperty("alt")
     If tool_tiptxt <> "" Then
       MsgBox "Tool tip text= " & tool_tiptxt
     End If
  Next

No comments:

Post a Comment