Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Conditional run of an action
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi all

In my web app I am showing page A if company is A and page B if company is B...and so on.

How do i tell QTP to run a different action based on the value of the column "Company" in my Data table ?
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi janriis,

You can acheive this as follows:

1. Create an action named say "Driver_Script"

2. Inside the Driver_Script action call your company-specific actions based on your conditions. (Tick "After the current step" option while inserting the company-specific actions inside the Driver_Script action)

The Driver_Script action will have code something like the below:

Code:
If Company = "A" Then
   RunAction "Action_A", oneIteration //number of action iteration may vary
   Else
   RunAction "Action_B", oneIteration
End If

You can make use of "LoadAndRunAction" instead of "RunAction" to avoid loading of unnecessary action(s) if you have QTP 10.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  run by action excellentpawan 0 1,735 03-01-2014, 08:08 AM
Last Post: excellentpawan
Exclamation QC is very slow and does not run my tc. My testcase has 'call to existing action' chong67 0 2,158 06-13-2012, 07:47 PM
Last Post: chong67
  Using Conditional Statement on O/P Parameter b/w QC BPT Components Ankesh 3 5,192 05-09-2012, 04:51 PM
Last Post: Shridevi.Salagare
  action status in QTP test - main action vanilla 1 4,607 02-12-2012, 10:59 PM
Last Post: rajpes
  How to call function lib at run time from an action anilyad 5 10,486 09-03-2010, 10:00 AM
Last Post: anilyad

Forum Jump:


Users browsing this thread: 2 Guest(s)