Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parameterizing a part of script
#1
Solved: 11 Years, 4 Months ago
hi guys

i am facing an issue

i have different actions for login to application and logging out from application

i.e

"login" (action name) to login to application
"logout" (action name) to log out from application

now in a new test (say "usercreation"----->name of test )i have the script to create user
name of action in this test is "createuser" (action name)
the test usercreation is parameterized for a set of data which is working fine when i run the test i.e only create user it creates the required no of user

but i want to login create user (n no. of times) then logout
now when i call the actions "login" and "logout" and arrange the actions as login->createuser->logout
the application is "logging in creating user then it logs out" then again it logins create user for another set of data the logsout"
while the requires scenario is it should "login create user (n no fo times without logging out) then once all users are created then logout"
Reply
#2
Solved: 11 Years, 4 Months ago
U want to run your second action i.e. to create the user(Create user) n number of times. for this u have to specify the no. of iterations your action should go
RunAction Actionname,Iteration,Parameters
Ex: Runaction "CreateUser",n

Correct me if wrong

Regards,
Sankalp
Reply
#3
Solved: 11 Years, 4 Months ago
The way to do is.

Code:
Call Login
For i=1 to DataTable.GetRowCount("Login_User","Global") ' This has all number of user Di that you are trying to create
   Call createUser(ByVal Login_User)
Next
Call LogOut

Reply
#4
Solved: 11 Years, 4 Months ago
Hi,

Please use the code below:

Code:
RunAction Login

rw_cnt=DataTable.GetCurrentSheet("Global").GetRowCount

For i=1 to rw_cnt
   DataTable.SetCurrentRow(i)
   RunAction CreateUser
Next

RunAction Logout

Regards,
Parminder
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Part of parameters missing when passing between actions skumar007 1 3,009 10-10-2014, 02:00 AM
Last Post: skumar007
  Parameterizing Function arguments rajpes 0 3,790 07-08-2011, 07:37 PM
Last Post: rajpes
  Exist returns false with part of innertext Milindt43 1 2,947 02-23-2011, 09:56 PM
Last Post: basanth27
Question ho to get a part of innertext's value lotos 9 13,250 01-11-2011, 07:46 PM
Last Post: lotos
  Two objects with same properties except for one part of the outerhtml changing reejais 5 4,734 10-22-2010, 09:55 PM
Last Post: reejais

Forum Jump:


Users browsing this thread: 1 Guest(s)