Forum Discussion

Nadav's avatar
Nadav
Contributor
7 years ago

Comparing 2 equal values failed in property checkpoint

Hi,I try to compare property in checkpoint, the property compare failed although it has same value
  • tristaanogre's avatar
    tristaanogre
    7 years ago

    You can write a script routine using the script editor of TestComplete.  You should have chosen a script language when you created your project.

     

    Once your script code is written, you can use the "Run Script Routine" operation to execute the code within your keyword test.

  • AlexKaras's avatar
    AlexKaras
    7 years ago

    Hi,

     

    > The value is float

    This is the key. Regular comparison logic does not work with floats due to their internal representation. Your approach with the threshold is valid and generally used one.

     

    Or, convert floats to strings as it was suggested by Robert and do strings comparison.