I am using the following line of code.
Set obj=Browser("name:=DART - DISH Network Advanced Rep Tool").Page("title:=DART - DISH Network Advanced Rep Tool").Frame("title:=Search").Webelement("html tag:=SPAN").Object
For i=0 to obj.Attributes.Length-1
msgbox obj.Attributes(i).Name&"="&Obj.Attributes( i).value
But there is an error coming in it.
Is there any solution of it???
Test Automation Engineer
Firstly, try to highlight the object and check whether your statement is identifying the object.
Browser("name:=DART - DISH Network Advanced Rep Tool").Page("title:=DART - DISH Network Advanced Rep Tool").Frame("title:=Search").Webelement("html tag:=SPAN").HighLight
Note: You need to use onemore property(along with html tag) to identify the WebElement uniquely in your DP.
What is the error you are getting?
Tarun Buy the NEW QTP Descriptive Programming Unplugged Book ** Download QTP Unplugged 2nd Edition eBook for FREE **
There is a runtime error coming in it.
I wanted to know how do we work with object attributes??
See there would be a error message also. Tell me the exact error message which is coming.
hi tarun ,
Now the code is working fine.I have added one extra propery in the webelement which is innertext.
it is showing a lot of name value pairs.
Are these run time or test object properties.
test object properties are only for recogniztion and run-time are the actuals which you get using DOM or GetROproperty.