Forum Discussion

Sherry's avatar
12 years ago

help! how to get total row count in Excel File datasource?

hi, I need some help here, I need to get the total row count in a Excel File which is used as DataSource. Does anyone know hot to do that? Thanks, Sherry
  • georgetjose's avatar
    6 years ago

    To get the total number of rows in the Excel.

    def rowCount = testRunner.testCase.getTestStepByName('DataSource').rowCount;

    or

    def rowCount =testRunner.testCase.testSteps["DataSource"].rowCount;

     

    Note: Assuming that DataSource is the name of the Step.