Micro Focus QTP (UFT) Forums
How to parameterize a link object/element in QTP - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: How to parameterize a link object/element in QTP (/Thread-How-to-parameterize-a-link-object-element-in-QTP)



How to parameterize a link object/element in QTP - galstar - 08-02-2010

Hi,

Please give me a hint how to parameterize a link element in QTP...As we can parameterize 'WebEdit' element/object ,can we parameterize 'Link' element/object and how can we????
I am doing recored and play and want to parameterize through keyword view and data table...
I will be very thankful to u


RE: How to parameterize a link object/element in QTP - supputuri - 08-02-2010

HI galstar,

You can parameterize the Link object, but we have to use the Descriptive Program or "SetToProperty" in order to work with that.

Descriptive Program:
'in the global sheet Create column with name as "LinkName" and enter your Link names in that column.
Now try to work with Link.
Code:
Browser("").Page("").Link("name:="& Datatable("LinkName",dtglobalsheet).Highlight


SetToProperty:
Browser("").Page("").Link("ORLink").SetToProperty "name",Datatable("LinkName",dtglobalsheet)
Browser("").Page("").Link("ORLink").Highlight

Please let me know if you need any more information on this.


RE: How to parameterize a link object/element in QTP - galstar - 08-03-2010

Hi,
Thanks for the solution but as i am doing record and play,So it is not working error message that object is not in repository is getting populated..But through this i got an idea and change the 'Name' propery of that link element through keyword view..Now it is working.. Smile
Thanku so much Dear


RE: How to parameterize a link object/element in QTP - Vivekraj A P - 12-16-2014

Instead, you can do parameterization in text Field in Object Repository.

Goto Object Repository --> Select Link Object --> Description Properties --> Text Value --> Value Configuration Window opens --> Select 'Parameter' --> enter a name --> Select Ok.

Now you can see a column created with a name you entered in Global Data Sheet.

Add as many link values as needed and do the needed parameterization.

Your script will iterated for each entered Link names in Global Sheet.

Suppose if you enter 10 Link names as Parameters, your script will run 10 times, each time it uses corresponding row Link name.

Hope this helps...Let me know, for any more queries.