Micro Focus QTP (UFT) Forums
How to create an object for all 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: How to create an object for all actions (/Thread-How-to-create-an-object-for-all-actions)



How to create an object for all actions - excellentpawan123 - 05-31-2014

Object test_case is created in action1

Code:
set test_case = fso.CreateTextFile("C:\Created projects\drive indices test cases", True)

some lines are written as following:

Code:
test_case.Write("Create new  -->  location --> ") & vbnewline
test_case.Write("Create new in field ") & vbnewline
test_case.Write("Create ") & vbnewline

In Action2 i want to continue writing next to the previous line but message comes object required.

Please help


RE: How to create an object for all actions - Jay - 06-05-2014

every action has a diff object repository. so what works on action1 will not work in any other action if its depended on object. you can export or from action 1 and associate with action2. or you can use shared or. please go through the basic understanding for QTP