Forum Discussion

judyh's avatar
judyh
Occasional Contributor
7 years ago

I am using a CSV for a Data-Driven loop but it's not working with a numeric option list

I'm testing a web application and I've created a csv for my Data-Driven loop. It was working great until I tried to populate a numeric option list (a list of about 60 four digit branch numbers).  Ins...
  • AlexKaras's avatar
    7 years ago

    Hi Judy,

     

    You did not mention how you are trying to set the value to the options list, but some methods provided by TestComplete can accept both a string and an integer as parameters. And if the integer is provided as a parameter then the method selects an item by the index. This is documented in the relevant help topics.

    So I would suggest to convert the parameter to string (e.g. using the aqConvert.VarToStr()) and check if it helps.

    Alternatively, you may explicitly provide a string parameter (e.g. like .<Method>('"' + aqConvert.VarToStr(<parameter>) + "'") )

  • tristaanogre's avatar
    tristaanogre
    7 years ago

    Ah, right... because it's not being called as a "table data" mode, you need to call it a bit differently...

     

    try.  

     

    aqConvert.IntToStr(KeywordTests.Checkin.Variables.POData.Value("Branch"))