Micro Focus QTP (UFT) Forums
If Object name is completely changing then I am unable to recognize that 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: If Object name is completely changing then I am unable to recognize that object (/Thread-If-Object-name-is-completely-changing-then-I-am-unable-to-recognize-that-object)



If Object name is completely changing then I am unable to recognize that object - swapna.9n9 - 11-14-2014

I am unable to execute below script with different useer logins, working fine for one user. How to handle dynamic objects - please help me with below script.

''Part of my script as below''''''''''
Code:
Browser("name:=Gmail").Page("title:=Gmail").WebEdit("html tag:=INPUT","name:=Email").Set x
    Browser("name:=Gmail").Page("title:=Gmail").WebEdit("html tag:=INPUT","name:=Passwd").Set y
    Browser("name:=Gmail").Page("title:=Gmail").WebButton("name:=Sign in").Click
    wait(10)
''''' Here the link in top right corner of gmail will change as per user login hence I do not want to recognise that object with name - tries x and y co-ordinates this is also faling, please help me on this.
Code:
Browser("name:=Inbox.*").Page("title:=Inbox.*").Link("x:=1171", "y:=47").Click
    Browser("name:=Inbox.*").Page("title:=Inbox.*").Link("name:=Sign out").Click