Forum Discussion

Ravik's avatar
Ravik
Super Contributor
11 years ago

Input data has been trancated while taking from csv

Hi all,



In our application, we need to be enter at least 16 digit number in a Textbox (Edit Box), I have took the input from csv file, when I put this input in our application, TestComplete gives me a warning message  "The text specified in the edit box has been truncated, since it was too long." but when I put same 16 digit number as hardcoded it will be accept.  what's the wrong with csv, please help.



Thanks

Ravik

12 Replies


  • Hi Ravik.


     


    Alternative is Excel spreadsheet. It works the same way as csv (title row may work as structure description). I'd suggest using Text type of data (cell format) for your digital sequences.


     


    If you continue getting this error (truncating of data) try to debug your code.


     


    1. Create local KDT variable and assign hardcoded value to it.


    2. Pass variable into text property.


    3. if there are no errors in this code, assign variable with the value taken from csv file.


    4. if you get error, log the value from variable, check it's actual length and text itself.


     


    Sorry I can not suggest something better, I tried to play with your scv, changed encoding (used ANSI vs Unicode): everything works as expected, TC understands text encodings properly (I use v9.31).


     


    One of the reasons why I asked to attach csv file (not to post it into forum message): may be something wrong with actual data stored in that file. If forum does not allow you to attach csv, you may attach zipped csv file.

  • Ravik's avatar
    Ravik
    Super Contributor
    Thanks Andrey,



    1- I am using TestComplete 8.7

    2- I have save csv file  as incoding - ANSI

    3- I have debug the code but still I am facing same issue.



    Please refer attached csv file.



    Yes ! we can Use Excel and solve the issue and we did,  but due to some limitation in Test Data,  we approched csv file.



    Well Thanks for your help !!