Thanks Mahendra,
 
But apparently there is problem using loops in actions..
 
lets say if you have to run the code in between (run from step on right 
click)... you would get the error invalid statement "Next"..(because as it past 
the loop...it thinks there is no loop and Next is unnecessary)
 
to avoid this problem I was trying to take control through Actions... but not 
successful..one thing that bothers me..
 
Lets say you break everything in Actions..like action 1 to action 5.. what 
would you do if you were to insert a new action in between action 3 and action 
4 ? how do you maintain the sequence of actions?
 
I really appreciate if someone takes time and help me understand..
 
Thanks
Kiran
 
 
 
 


--- On Wed, 11/11/09, mahendra singh <[email protected]> wrote:


From: mahendra singh <[email protected]>
Subject: Re: Action1- run only one iteration.....Action2-run multiple iterations
To: [email protected]
Date: Wednesday, November 11, 2009, 7:49 AM



hi kiran
i think  u r talking about loops in qtp so if m i ringht then try
 
this example
 
" The test will login once but create multiple order i mean 10 times, and u can 
also use parameter for ceate multiple order with deffrent values."
 
SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest 
Professional\samples\flight\app\flight4a.exe","","C:\Program Files\Mercury 
Interactive\QuickTest Professional\samples\flight\app\","open"
Dialog("Login").WinEdit("Agent Name:").Set "singh"
Dialog("Login").WinEdit("Agent Name:").Type  micTab
Dialog("Login").WinEdit("Password:").SetSecure 
"4afa658bea867034a0d6c29913f5d1f0cd25f61b"
Dialog("Login").WinEdit("Password:").Type  micReturn
For i=1to 10 step 1
Window("Flight Reservation").WinObject("Date of Flight:").Type "121212"
Window("Flight Reservation").WinComboBox("Fly From:").Select "London"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Los Angeles"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "dfd"
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").WinButton("Button").Click
Next


 
On 11/10/09, Kiran Ogeti <[email protected]> wrote: 





Hi,
 
That is what it was.. but did not help me out.. I think it only because of me 
runnig data from global sheet.. I think I have to break them up to local data 
sheets..
 
Thanks


--- On Tue, 11/10/09, kamani venkat <[email protected]> wrote:
 

From: kamani venkat <[email protected]>
Subject: Action1- run only one iteration.....Action2-run multiple iterations
To: [email protected]
Date: Tuesday, November 10, 2009, 4:17 PM 




Hi,
 
open individual actions,
for first action: in Settings Dialog box: under Run tab: set the radio 
button-Run only one row
open second actions: follow the same steps and set the radio button-Run all 
rows(otherwise set run 1 to 10 rows)..
If is there any other smart way is there plz let me know..
 
Regards,
Venkat Kamani

 
On Tue, Nov 10, 2009 at 9:14 PM, Kiran Ogeti <[email protected]> wrote:







Basically my action1 contains - login info
 
Action 2 contains- code for the main page
 
I changed the settings accordigly on "Action call properties"... (action1- run 
one iteration only) and (action2- run rows from 1 to 10)  
 
but does not work at all.. it calls the action1 also for every iteration
 
I think there must be a small thing i am missing.. can anybody help
 
Thanks
 









      
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to