Micro Focus QTP (UFT) Forums
Sharing objects between actions - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Sharing objects between actions (/Thread-Sharing-objects-between-actions)



Sharing objects between actions - Legion181 - 06-12-2009

I have two actions, one to login the other to create order records.

Action 1:

Code:
Browser("Google").Page("xx").WebEdit("username").Set "xx"
Browser("Google").Page("xx").WebEdit("password").SetSecure "xx"
Browser("Google").Page("xx").WebButton("Log In").Click

RunAction "Action2",  allIterations


Action 2:

Code:
Browser("Google").Page("xx").Frame("nav").Link("Create Order").Click
Browser("Google").Page("xx").Frame("main").WebList("xx").Select "xx"
Browser("Google").Page("xx").Frame("main_2").WebButton("Save").Click



When I try to run it I login fine but get a run time error:

The "Google" object was not found in the Object Repository.
Check the Object Repository to confirm that the object exists or to find the correct name for the object.

Line (2):
Code:
"Browser("Google").Page("XX").Frame("nav").Link("Create Order").Click".
Tip: If the objects in your application have changed, the Maintenance Run Mode can
help you identify and update your steps and/or the objects in your repository.


Please help me add the "Google" object so that the other Actions can use it.