Doubt in non reusable 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: Doubt in non reusable actions (/Thread-Doubt-in-non-reusable-actions) |
Doubt in non reusable actions - pradeep singh - 04-04-2011 I am learning qtp.I am doing practice of actions.I have doubt given as below I create two tests i.e. test1 and test2 test1 contains two actions i.e. login (non reusable action) and logout (reusable action) test2 contains booking order action Now i make a call to copy of non reusable login action from test1 in test2 and also make a call to existing reusable logout action from test1 in test2.It runs successfully. Now my question (doubt) is this:I have read somewhere that non reusable action can not be use in other tests. But here i have make a call to copy of non reusable login action from test1 into test2?How is it possible to use non reusable action of test1 in other test2.Please clear my doubt. RE: Doubt in non reusable actions - manishbhalshankar - 04-05-2011 Hi Pradeep, Please go through the help provided with QTP. It provides good explanation. RE: Doubt in non reusable actions - pradeep singh - 04-05-2011 Hi I could not get anything in help section which clear my above doubt.Please explain /clear me. RE: Doubt in non reusable actions - manishbhalshankar - 04-05-2011 Hi Pradeep, In qtp help, search for Actions keyword. From the list below select "copy of". You will get the required info. RE: Doubt in non reusable actions - basanth27 - 04-05-2011 Manish - He is never going to find the water in the desert. If you are open to listen, then i would say, you must give leverage to a person who has declared that he is "learning QTP" and is intrested to clear his doubts which he has accured over the internet from faksters posting answers which they dream of. In this case, i would request you, to have provided a bit more information which would be as good as taking the horse to the pond. Well, if you reached this far, and you find this offensive, please use the undo feature on your brain and ignore me . Pradeep - Very intresting observation. I am sorry, i have been held up and hence had no time to look in and reply. I must apologize, you havent recieved a correct reply, although manish really showed you the door it was left to you to open and explore further. What you have read is partially correct and some of it is un-true. You can make a call to copy of an action for an non-reusable action in a different test. That statement is true. But have you observed what happens after you have made the call and the action appears in your test? Let us know your observations then. From what QTP has to say, this is what they mean with definitions for the various action names, Code: Reusable action: An action that can be called multiple times by the test with which it is stored (the local test), as well as by other tests. The definitions are self-explanatory. In short, if you have Test1->Non-Reusable ACtion1 and you make a call to this Non-Reusable Action1 on to Test2, then the properties of "Non-Reusable Action1" in Test2 is changed to an readonly reusable action. The reason is, because you have forcibly called this action to be a copy of the action which the action thinks that you want to reuse this in the test2 multiple times. However, in Test1 the property of the "Non-Reusable Action1" remains as Non-Reusable and can be called only once in the same test where it is stored. If it is still confusing or you havent found the way yet, i suggest you read the section "Working with actions" on QTP help as suggested by manish and pick up specific doubts and put it across, which we will be very much happy to answer. RE: Doubt in non reusable actions - pradeep singh - 04-06-2011 Thanks basanth27 For your nice explaination.It is cleared to me now. RE: Doubt in non reusable actions - srsaritha - 11-19-2011 Hi... Basanth, I also posted same doubt... sorry.. I didn't see this thread. I refer GURU99 videos and I got same doubt. Can u pls make it clear... I use QTP 10 and if i call a non reusable action it works, not read only, can execute n no of times..... |