Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to execute action 1 once only from 5 actions
#1
Solved: 10 Years, 9 Months, 1 Week 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: 10 Years, 9 Months, 1 Week 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: 10 Years, 9 Months, 1 Week 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,455 11-21-2016, 04:22 PM
Last Post: Ankur
  Not able to execute script shanthalaAR 0 1,943 06-27-2015, 03:53 AM
Last Post: shanthalaAR
  How to Execute a testset from QC using OTA framework AutomationTester2011 12 51,604 01-21-2015, 09:22 PM
Last Post: karthik_sanakran
  How to call Actions from other Actions Naresh 1 7,705 09-25-2014, 10:26 AM
Last Post: vinod123
  Is there a possible way to execute sql in QTP using 'WITH' clause shruthic 0 2,993 04-26-2014, 11:42 PM
Last Post: shruthic

Forum Jump:


Users browsing this thread: 1 Guest(s)