-
Junior Member
Dynamic Link
Hi All,
Am new to QTP,
How QTP can select the Dynamic link?
Regards,
-
Expert Member
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....
-
Junior Member
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.
-
Expert Member
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...
-
Expert Member
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
-
Banned
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.
-
Junior Member
Re: Dynamic Link
Can you please Elaborate the following statement:
WebElement.Object.PropertyName="PropertyValue"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules