Extracting values of a particular Node
How do i extract attrbutes using HTML Dom in QTP. I am bale to get the Count. But how do i extract the values of the same.
I have attached the HTML snap shot for the reference.
Set Document = Browser("abc").Page("abc").Frame("GChart_Frame_0") .Object.getElementsByTagName("rect")
lengofg = Document.length
' This returns the count as 3.
I have to print the attributes of the 3rd rect tag.
I have to click the 3rd rect tag which has fill property.
Re: Extracting values of a particular Node
you may want to post this in the QTP Forum.
Off the top of my head, you can use descriptive programming, get the count and set the Frame to use :
RectTag = "TheLinkName"&Document ' Link name will come from the GUI Spy and the count to get the 3rd one, sometimes developers just add sequential #
Browser("abc").Page("abc").Frame("GChart_Frame_0") .ObjName("Attribute:=RectTag").Click ' Use descriptive programming to reference the object dynamically based on the get element value returned.