Forum Discussion

nedbacan's avatar
nedbacan
Frequent Contributor
2 years ago
Solved

Data Driven Test using multiple selections from listbox

Using the data driven routine in Test Complete, is it possible to create this scenario.

 

1) User enters patient 1 (data driven from patients spreadsheet input) 

2) Patient 1 goes through the workflow and select physician 1 from list box.

3) Completes the workflow and generate report.

4) Loops back to step1 and enters the next patient 2 (data driven from spreadsheet input - next patient row)

5) Patient 2 goes through the workflow and select physician 2 from list box.

6) Completes the workflow and generate report.

 

I guess using a data driven loop within another data driven loop, but the selection of physician is an item selection and not a data entry.

 

Note:  Physician selection is a separate script from entering the physician.

 

If it's possible to do, can you provide a sample. 

 

Thank you

 

  • Yes, it's possible -  If you're using an Excel spreadsheet, an example format will look like,

     

    Patients, Physicians
    patient 1, physician 1
    patient 2, physician 2
    patient 3, physician 1

     

    Just iterate through the list, and use the appopriate column to populate your fields.

     

    There's a video here https://support.smartbear.com/testcomplete/videos/ which gives an example.

2 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    If patient 1 always goes with physician 1, then you only need one loop. Each row in the dataset will have a patient name and a physician name and you can do all the work inside of one iteration of the loop. You could also do it with separate lists of patients and physicians, but it's still only one loop.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Yes, it's possible -  If you're using an Excel spreadsheet, an example format will look like,

     

    Patients, Physicians
    patient 1, physician 1
    patient 2, physician 2
    patient 3, physician 1

     

    Just iterate through the list, and use the appopriate column to populate your fields.

     

    There's a video here https://support.smartbear.com/testcomplete/videos/ which gives an example.