Forum Discussion

david_quick's avatar
david_quick
Occasional Contributor
12 years ago

Data Driven Loop requires additional duplicate record to work

The website under test contains a pop-up form that has seven checkboxes.

Rather than map each checkbox I have:


  1. Created a project variable 'idstr' - type 'string'


  2. Created a project variable 'checkbox' - type 'db table' with the attached csv file


  3. In NameMapping: Mapped one of the check boxes with a property 'idstr' and value using the project variable 'idstr'


  4. Created a keyword test which:

    a. uses a data driven loop and the project variable 'check box' to set the project variable 'idstr' using the 'idstr' column in the data file

    b. sets the checkbox using the operation ClickChecked and value from the 'CheckedStatus' column in the data file

    c. calls the RefreshMappingInfo operation to re-set the checkbox namemapping object


My issue is the last record in the 'check box' data file is not read, so the last checkbox is not checked/unchecked.  A work around is to add a duplicate record of the last record, not ideal.



I've attached a screenshot showing the keyword test, namemapping and project variables.  I cannot attach the csv file???
  • david_quick's avatar
    david_quick
    Occasional Contributor
    The issue was the position of the RefreshMappingInfo step.  I moved it to after the 'Set Variable Value' step and this seems to have worked.