Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
End
#1
Solved: 11 Years, 5 Months ago
I am using a data table with multiple rows. When the test completes I would like the test to do something at the end. Right now if I put a command at the end of the test it is executed after EACH row and I do not want that. I need some sort of condition so when the test completes the command is excuted.
Reply
#2
Solved: 11 Years, 5 Months ago
Hi Anna,
You can do that by adding the functions you need to execute at the end of the loop.
By the loop, i mean the loop you use to go through the different rows in the datasheet.
Reply
#3
Solved: 11 Years, 5 Months ago
Hi,
I do not use a loop. I just put stuff in the table and the script runs automatically. Any other ideas?
Reply
#4
Solved: 11 Years, 5 Months ago
Hi Anna,
you must divide your test in 2 actions, the first with the datatable (setting the action call properties on 'run on all rows'), and in the 2nd action the last commands.
Reply
#5
Solved: 11 Years, 5 Months ago
I see. I wound up doing this:
Code:
If Datatable.GetCurrentRow =Datatable.GetRowCount then
blah..
end if
This seems to work. However I will try using the actions. I have never used them before so it may be interesting. Thanks,.
Reply
#6
Solved: 11 Years, 5 Months ago
Hi Anna,

Step1; Test-->Settings-->Run-->Select "Run On only one iteration" optionbutton.

Step2: In the Script, get the row count of datatable & store it in a variable as given below :
Code:
rc=datatable.getrowcount
step3: use the for loop here as given below :
          for i=1 to rc
           datatable.SetCurrentRow(i)
            ---------
            ---------
            ---------
            --------
          next

Step4: After the next Statement , you give the required command to be executed & now execute the script n see.......

I hope you got your requirement Solved.

Regards.
Sreekanth Chilam
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Expected End statement error Lavanya N 2 5,236 07-27-2015, 01:52 PM
Last Post: Lavanya N
  closing browser at end bistritapcv 3 6,267 04-12-2013, 07:21 AM
Last Post: basanth27
  How to end action on error adsherman 6 8,533 07-28-2012, 02:16 AM
Last Post: adsherman
  How to read an * at the end of a string sqadri 2 2,619 01-06-2012, 04:01 PM
Last Post: sshukla12
  Handle start and end of tests fafanoulele 0 2,475 09-14-2011, 03:04 PM
Last Post: fafanoulele

Forum Jump:


Users browsing this thread: 1 Guest(s)