Submitted Questions

  • For Loop problem in QTP

    I am using the For Loop to get data from the data table. The summary code is:C=datatable.getrowcountFor i=1 to cmsgbox Datatable.Value("Column1")Next'The message box always returns data of row 1. Irrespective of the iteration. How is it possible.

    rohan

    • May 22nd, 2015

    Rc = datatable.getsheet("sheetname").getRowCount
    to increase the loop

    for i = 1 to rc
    datatable.SetCurrentRow(i)
    obj1 = datatable.value("Columnname","sheetname")

    next

    helloqtp

    • Jul 5th, 2014

    I think the issue lies in the settings , where you have to check for one iteration only .. by default it remains checked as for all the rows ..