WORKING WITH QTP

TestEveryThinG

Expand Tree Object in Web Page

Posted by rajivkumarnandvani on May 10, 2008

” this script expand tree object in webpage

set objdesc= Description.Create()
objdesc(“micclass”).value =”Image”
Set Objimage = Browser(“<browsername>”).Page(“<browserpage>”).ChildObjects(objdesc)
ImageCount = Objimage.Count
For i = 0 To ImageCount – 1
var = Objimage(i).GetROProperty(“alt”)
If InStr(1, var, “Expand”, 1) > 0 Then
Objimage(i).click

ImageCount = Objimage.Count

End If

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: