Forum Discussion

googleid_115177's avatar
googleid_115177
New Contributor
12 years ago

Introducing If...Then...Else

Complete novice.  Patience requested.



I've recorded a test using TestComplete made it a data driven script and loops through an excel spreadsheet.



It appears that when running the test, there are values missing in the spreadsheet that cause the playback to end.



What I would like to do is "test" the value of the spreadsheet column and if it doesn't pass my test, then don't try to map it to the screen of my application.



I have searched and searched and can't seem to figure out how to incorporate a If...Then...Else command with my code into the the test.



Help would be greatly appreciated.



Jim P.

1 Reply

  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3
    Inside the loop, add something like

    If (tablefield1 not empty) then 

      *whatever your set text line is goes here*

    else

       *log a message and go on*



    (tablefield1 not empty) will be an Object Property