Micro Focus QTP (UFT) Forums
DP -How to identify dynmaic objects - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: DP -How to identify dynmaic objects (/Thread-DP-How-to-identify-dynmaic-objects)



DP -How to identify dynmaic objects - om.vikas - 09-20-2009

Hi All

Please can you tell me how we can identify the dynamic objects.

Here is my specific problem..

We have an front end application where users (users are Link object class and single click on them takes us to their customized page) are displayed in a tree sturcture and they keep changing depending on the data created on backend application.

We are passing the user data through GlobalSheet/Excelsheet during execution (so that we do not need change our scripts as data changes) and trying to click on a user. But it is not working.(Error -Object not found in Object repositry). I do not want to use Object repositry in this case... data keep changing so frequently.. that maintaining the Oobject repositry does not seem a good option to us.

Below is the sample code.

Code:
userdata=DataTable("ParamName",dtGlobalSheet)
Browser("title:=X").Page("title:=X").Frame("Name:=Y").Link("Name:=userdata").Click

Can you guys please tell me what is going wrong here or suggest other way out for this situation.


Thanks
Vikas


RE: DP -How to identify dynmaic objects - varsha - 09-21-2009

Hi vikas,
For dynamic objects you can pass the parameter by appending it to the property name with &

try the below code
Code:
userdata=DataTable("ParamName",dtGlobalSheet)
Browser("title:=X").Page("title:=X").Frame("Name:=Y").Link("Name:="&userdata).Click