Forum Discussion

DainiusA's avatar
DainiusA
Contributor
5 years ago
Solved

If..Then else statement

So i am trying to test one of my usable programs. The steps are i open a new window enter the data and press enter. After that i am changing my parameters and then i press the same button to open a n...
  • tristaanogre's avatar
    tristaanogre
    5 years ago

    OK... instead of a strict if..then, there is an operation in keyword tests called "If object".  You should use that... and you'll detect "if this object Exists/Visble/Enabled" perform something... then the "Else" operation can operate from that.  

    The way you have it written you have "If the object = true"... but that doesn't work... it's not the OBJECT that you are checking to see if it's true, it's some state of the object... like Exists or Visible...

    See https://support.smartbear.com/testcomplete/docs/keyword-testing/reference/test-actions/if-object.html