Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to merge two scripts of the same URL in QTP 9.5
#1
Solved: 10 Years, 8 Months, 3 Weeks ago
Hi all ,
I have some test cases which has common steps..
e.g. Test Case 1: Steps a,b,c,d,e,f,g,h
Test Case 2: Steps a,b,c,d,i,j,k,l.. etc.

So i need to record and create a common script for the common set of steps (e.g. a,b,c,d) and then have separate scripts for the other steps in each test case (e.g. 1. e,f,g,h 2. i,j,k,l).

My plan is to create a common script and then create separate scripts. And then merge the common script and the other scripts as necessary.
so the Scripts for the test cases will look like this,
Test Case 1: Common Script + Script for steps e,f,g,h
Test Case 2: Common Script + Script for steps i,j,k,l

Is there a possibility to do this? If so please let me know.

NOTE: I am using QTP 9.5

Thank you
Reply
#2
Solved: 10 Years, 8 Months, 3 Weeks ago
Yes Rangi, this is possible to do.
You will have create the script as reusables and then you can include them in any script you need.

In my opinion you should create reusables for each common and seperate functions.
Then you will be able to assemble them in a script as you need for case 1 and 2.

Reply
#3
Solved: 10 Years, 8 Months, 3 Weeks ago
This is what the reusable action does. You create a piece of code and use it over and over again at various places.

Regarding merging of actions we don't have a straight forward way like the we have for splitting. But you can do it this way:

  1. Create a shared OR having local OR's of the two actions.
  2. Copy paste the lines of code from one script into another and you will get your 'common script'



--
Edit: Looks like we both were replying at the same time Saket Smile
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#4
Solved: 10 Years, 8 Months, 3 Weeks ago Smile 
Thank you very much Saket and Ankur Shy .. Ankur i read your articles 'Step by Step Guide line to learn QTP', which is really helpful .

Thanks again to both of you
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  ‘General Run Error’ when trying to fetch URL in Browser Address Bar with DP sukhvinderh 5 5,471 10-14-2011, 07:29 PM
Last Post: v.swaminathan
  Getting URL from Internet Explorer BVVPrasad 1 4,588 07-25-2011, 08:24 AM
Last Post: rajpes
  how to capture the current page URL sidartha 9 7,101 01-26-2011, 11:04 PM
Last Post: Brian.Osborne
  Problem with invoking url in internet explorer vijay44 1 2,927 01-21-2010, 01:11 PM
Last Post: Saket
  Deleting portion of URL using QTP and Appending to Existing URL FRashid 1 2,755 12-11-2009, 12:34 PM
Last Post: Saket

Forum Jump:


Users browsing this thread: 1 Guest(s)