Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parameterization on desired no. of rows in DataTable
#1
Solved: 10 Years, 9 Months, 1 Week ago
Hi,

I need to search the books in a search page, and i have the book ID in a local sheet of the data table. Now i want to control the no. of items to be searched through the configurable value in variable. Can you please help me out by explaining how this can be done?

Or
How can i configure the no. of datatable iterations in my QTP code?
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
Hi Geet,

I would suggest you to follow any of the below couple of ways for your query.

Way1 : Go to Keyword View > Select 'TestFlow' from Action Toolbar, then Right Click on required Action , select "Action Call Properties" > choose "Run on All rows" & click OK.
Now re-execute the script & see...


Way2: Refer the below code, implement accordingly & re-execute and seeSmile
Code:
For i=1 to Datatable.GetSheet("required Action").GetRowCount
        Datatable.GetSheet("required Action").SetCurrentRow(i)
            'Statement 1
                  ----
                  ----
                  ----
            'Statement n
Next
Reply
#3
Solved: 10 Years, 9 Months, 1 Week ago
Thanks a lot Sreekanth, this code really helped me.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Action Parameterization Issue Slothman 1 1,574 10-31-2020, 01:05 PM
Last Post: Ankur
  Multiple rows of test data Bhuvana 0 1,156 01-03-2020, 09:30 PM
Last Post: Bhuvana
  Business Components Parameterization YogeshCallappa 0 1,511 06-07-2017, 04:32 PM
Last Post: YogeshCallappa
  Parameterization Hanskanika 0 1,533 11-20-2015, 04:45 PM
Last Post: Hanskanika
  Adding data into rows that add dynamically with setcelldata azar81 4 5,664 04-13-2015, 05:24 PM
Last Post: vidya2k2

Forum Jump:


Users browsing this thread: 1 Guest(s)