Hi All,
Am new to QTP,
How QTP can select the Dynamic link?
Regards,
Printable View
Hi All,
Am new to QTP,
How QTP can select the Dynamic link?
Regards,
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.
[U]Option 2[/U]
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....
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,
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...
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
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.
Can you please Elaborate the following statement:
WebElement.Object.PropertyName="PropertyValue"