Forum Discussion

heidi_n's avatar
heidi_n
Regular Contributor
9 years ago

If Then vs. Checkpoint?

In my test, I would like it to perform as follows:

 

If this check box is checked, do X.

If it is unchecked, check it and do X.

 

Would I need to use an If Then statement and/or Checkpoint? How will TC know if the box is checked or not?

 

I'm using Keyword tests and don't have a background in coding.

 

Thanks,

 

Heidi

1 Reply

  • SmartBearDan's avatar
    SmartBearDan
    SmartBear Alumni (Retired)

    Hi Heidi,

     

    Depending on the type of checkbox you're working with, you may not need to add any logic at all.  For example, when I work with a Windows checkbox and check off an item, this is what gets recorded:

     

    Check Recording.png

    This action can be played back and will work regardless if the checkbox is already checked or not.

     

    So I would suggest trying that first, if that doesn't work you can use an If...Then statement.

     

    If…Then Operation

     

    -Dan