Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to execute action 1 once only from 5 actions
#1
Solved: 11 Years, 4 Months ago
Hi, just need some advise on this, i have a script with 5 actions

1. navigation
2. serach code
3. main loop if found then call action update otherwise call action insert.

My question is how do i just execute action 1 once only and let it loop thr from action 2 onward. i have tried this in my action 1

Code:
if Environment ("ActionIteration") = 1 then
  codes for navigation
End if

the problem is Environment ("ActionIteration") always return 1
Reply
#2
Solved: 11 Years, 4 Months ago
Hi Jenny,

If I have correctly understood, you have 5 actions, let say Action1..to..Action5.

Now, you want Action1 to run once and you want to put all other actions in a conditional loop.

If this is the case, the you can do this in following way:

Quote:1. Create an action and name it as say "Driver_Script"

2. Inside this action insert all your 5 actions and chose "After the current step" option for Location (Do all this in Expert View of Driver_Script action)

3. Now you can leave the first action and can put the rest actions inside a conditional loop

If this is not the case, then still you can follow this approach but with some modifications.

Please let me know for further clarification.
Reply
#3
Solved: 11 Years, 4 Months ago
thank you for the suggestion, i will try this out
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Execute button of putton won't be clicke automaticly in UFT (VB) MarUFT 3 2,675 11-21-2016, 04:22 PM
Last Post: Ankur
  Not able to execute script shanthalaAR 0 2,078 06-27-2015, 03:53 AM
Last Post: shanthalaAR
  How to Execute a testset from QC using OTA framework AutomationTester2011 12 52,575 01-21-2015, 09:22 PM
Last Post: karthik_sanakran
  How to call Actions from other Actions Naresh 1 7,982 09-25-2014, 10:26 AM
Last Post: vinod123
  Is there a possible way to execute sql in QTP using 'WITH' clause shruthic 0 3,105 04-26-2014, 11:42 PM
Last Post: shruthic

Forum Jump:


Users browsing this thread: 1 Guest(s)