Forum Discussion

KorpTestComplet's avatar
KorpTestComplet
New Contributor
8 years ago

How to restore for default values in TableGrids on execution time?

I alter values in execution time for obtain the result specifies. But i have a need return this values altered for default values, as stored in variable TableGrid. i have possibility of make this?

 

Thanks

4 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I'm not sure I understand the question.  

    So, in your test code, you alter values in the grid from the default values.  Those default values are stored in a variable. And you want to return the grid back to the defaults?

     

    It sounds like simply writing some sort of looping code to go through the values of the stored grid and set the "live" grid to those values.  Unless there's some complexity that is not coming through in your question.

    It would be helpful to see the code that you are executing, perhaps the variable declaration you made, information about what type of grid it is, etc.

    • KorpTestComplet's avatar
      KorpTestComplet
      New Contributor

      So, I have a tableGrid that has the column "DATE" and in the line with the information I leave as default "D + 0", for example, at runtime, I do the handling of this expression and add the current date or conform The parameter (D + 0 = today, D + 1 = one more day ...). But, for example, I want you to change that date to the current date, back to D + 0. Again with the value D + 0 and not 2017/03/01.

      But in the properties of TableGrids I did not find any information to reset to default values. It is possible?

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        I'm assuming TableGrid is the component of your application?  Or is it a variable in TestComplete?

         

        If the former, that's out of the realm of possibility for TestComplete.  If the method doesn't exist, you need to do the reset manually using some sort of code  unit to do the reset.

        As for the latter... when you exit the project, if it's a temporary variable, it will reset to defaults at the beginning of your next test run.