Forum Discussion

dbaechtel's avatar
dbaechtel
Contributor
11 years ago

How do I compare an Object Property to a Test Complete variable?

What commands do I use in a Keyword Test to compare an Object Property to a Test Complete variable value.

The Checkpoint Wizard will compare an Object Property to a constant value, but I don't understand how to substitute a Test Complete variable to be used as the value to compare.

Thanks for any advice.
  • Create your Property Checkpoint and then look for the ellipses in the right side of the Value field.  You can drill down in there and change the value to a variable.  I attached screenshots, see if that helps.
  • Create your Property Checkpoint and then look for the ellipses in the right side of the Value field.  You can drill down in there and change the value to a variable.  I attached screenshots, see if that helps.
  • The ellipses doesn't show up for me until I click in the Value field.  If that's not working in your version, then we need Tanya to come back and look!  
    • testcrisis's avatar
      testcrisis
      Frequent Visitor

      This is the kind of thing that drives me nuts about TestComplete... it's an incredibly simple use case, of course testers want to use variables in checkpoints! The SmartBear devs know that, and they went to the trouble to include this functionality, but they buried it out of context in a menu that isn't part of the usual workflow for this action.

      • Marsha_R's avatar
        Marsha_R
        Moderator

        I would argue that there's no such thing as "usual workflow".  If Smartbear changed the flow to include the variables directly, then there would be people asking for that option to be removed because they never used it and now it's in their way.  

  • In one case I am trying to compare two string values that are on different pages. So I put the value of the string value from the first page into a TestComplete variable, then I navigate to the second Page. I want to compare the contentText property of an Object on the second page to the TestComplete variable that I stored.

    Is there any way to do this in a Keyword Test? How?

    There are more sophisticated examples, by this is the basic issue.

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Don,


     


    You should select the corresponding mode to compare a property's value with a variable in the Edit Parameter dialog - Mode=Variable.



     

  • I do not see where I can edit the Property Checkpoint Value to Compare to. I only see a choice of a Value that is the current value of the Property or a Value that I type in.

    How do I change this value to a TC variable? Typing in the variable name does not work.

    See attached screen.
  • As you can see from the screen shot attached, no ellipse appear in the keyword test that allows me to edit the Value Parameter. I am using versio 10.10.752.7.



    How do I edit the Value parameter when no ellipse appears?

    Where can I find this ellipse in my version?