custom object properties question
I was wondering if through descriptive programming or any other method if it was possible to use a custom property to identify an object on the page.
I am testing a web application and was wondering if for example I put a custom property in the HTML tag that QTP would pick it up.
<font class="small">Code:</font><hr /><pre> <a href="autotest.htm" objRepCode="myLinkyPoo">This is a link</a> </pre><hr />
The above link example has a property called objRepCode which is not your usual DOM object property. I am trying to determine if I can use that property to identify that link within QTP.
It seems even with DP I am constrained to a certain list of properties based on the object type.
Re: custom object properties question
Msgbox Browser("Browser").Page("Page").Link("This is a link").Exist(0)
Msgbox Browser("Browser").Page("Page").Link("objRepCode:= myLinkyPoo").Exist(0)
Both the above worked fine for me.