Geeks Talk

Prepare for your Next Interview




Dynamic Link

This is a discussion on Dynamic Link within the QTP forums, part of the Software Testing category; Hi All, Am new to QTP, How QTP can select the Dynamic link? Regards,...


Go Back   Geeks Talk > Software Testing > QTP

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 02-20-2008
Junior Member
 
Join Date: Feb 2008
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
monikasangwan is on a distinguished road
Dynamic Link

Hi All,
Am new to QTP,
How QTP can select the Dynamic link?

Regards,
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-20-2008
Expert Member
 
Join Date: Oct 2007
Location: Mumbai
Posts: 347
Thanks: 4
Thanked 54 Times in 44 Posts
bizzzzzare is on a distinguished road
Re: Dynamic Link

Hi,

Use Descriptive Programming. Incase the link gets created dynamically at runtime, it would not be part of your OR.

Hence using Object Spy learn the Mandatory properties of the link created during runtime and pass the same the same to the Name:Value Pair.

Set ObjDesc = Description.create()
ObjDesc("name").value = "DynamicLinkName"
objDesc("html tag").value = "PropertyValue"

Use this ObjDesc in your script at the instance where the Dynamic link occurs.

Option 2

Incase the link is already a part of your OR, but only the property changes at runtime, use the GetROProperty method to fetch the runtime value of name, text of the link. Update the TestObject Property accordingly.

Cheers....
__________________
Regards,

V.Umesh Krishnan
QA Consultant
Reply With Quote
  #3 (permalink)  
Old 02-20-2008
Junior Member
 
Join Date: Feb 2008
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
monikasangwan is on a distinguished road
Re: Dynamic Link

Hi,

That Dynamic link is the part of OR and we need to open that link for editing. for that need to use the Click method. Can you please tell me how to use GetRoProperty with Click method.
Could you please explain me how to Update the Test Object Property.



Regards,

Last edited by monikasangwan : 02-20-2008 at 08:40 AM.
Reply With Quote
  #4 (permalink)  
Old 02-20-2008
Expert Member
 
Join Date: Oct 2007
Location: Mumbai
Posts: 347
Thanks: 4
Thanked 54 Times in 44 Posts
bizzzzzare is on a distinguished road
Re: Dynamic Link

Hi,

use the GetROProperty to trap the dynamic properties of the specified link.

Unfortunately QTP does not have a SetROProperty to change the Object properties at runtime. We can use the Object method to change the property like -

WebElement.Object.PropertyName = "PropertyValue".

You could use the above syntax to try and change the Link properties to trapped Dynamic values. Use the click method on that then.

I would still suggest you use descriptive programming which would be a better solution.

Cheers...
__________________
Regards,

V.Umesh Krishnan
QA Consultant
Reply With Quote
  #5 (permalink)  
Old 02-20-2008
Contributing Member
 
Join Date: Sep 2007
Location: Hyderabad
Posts: 93
Thanks: 1
Thanked 14 Times in 13 Posts
rajaputra is on a distinguished road
Re: Dynamic Link

Hi Umesh,

The script you have given is usefull for the dynamically created link.

But how to click on the link which is scrolling here and there in a page?

_________________

Rajaputra
Reply With Quote
  #6 (permalink)  
Old 02-21-2008
Banned
 
Join Date: Oct 2007
Location: Hyderabad
Posts: 176
Thanks: 2
Thanked 11 Times in 11 Posts
quality_quantity is on a distinguished road
Re: Dynamic Link

Have you checked QTP repository , as you said in your mail its a dynamic Menu the menu name recorded and while replay may not match in your repositiry.
You can parametrize your menu name property in your repositiry.
Reply With Quote
  #7 (permalink)  
Old 02-21-2008
Junior Member
 
Join Date: Feb 2008
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
monikasangwan is on a distinguished road
Re: Dynamic Link

Can you please Elaborate the following statement:
WebElement.Object.PropertyName="PropertyValue"
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
How can we parameter a Web link iliaz.shaik QTP 4 03-26-2008 03:32 AM
Link with database rkumar_123 Data Warehousing 0 02-12-2008 05:08 AM
send me link rahulvegi Java 0 01-07-2008 07:28 AM
how to link jsp pages banjali JSP 3 06-15-2007 08:11 AM
Clicking on corresponding add link JobHelper QTP 1 01-17-2007 09:44 AM


All times are GMT -4. The time now is 06:25 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved