How to convert a String into a Object - 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: How to convert a String into a Object (/Thread-How-to-convert-a-String-into-a-Object) |
How to convert a String into a Object - vjjohnson04 - 10-25-2012 Hi all, I am trying to create a function to check if a user specified Object exists. 3 Input values is the Object Type, Object Name, and Object Id. for eg: when we use the Browser("micClass:=Browser").Page("micClass:=Page").Obj_type(Obj_id).Exists [/quote][/code] Code: Function Obj_exists(Obj_type,Obj_name,Obj_id) RE: How to convert a String into a Object - Ankesh - 10-26-2012 try using Eval(). It will evaluate a string into an expression. Regards, Ankesh |