Forum Discussion

william_roe's avatar
william_roe
Super Contributor
10 years ago

WaitProperty Contains

How do I define a keyword test that waits for a property to contain a certain value. I've identified the object on the screen, selected the 'WaitProperty' action and set the PropertyName (contentText). However, I cannot figure out how to specify the 'PropertyValue' to use the contains comparison. I've looked at the 'Code Expression' Mode (see attached) but cannot figure what to enter.
  • Hi Keith,



    You can wildcard the value as Purchase Order*.



  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi Keith,



    You can wildcard the value as Purchase Order*.



  • Are you calculating the value that you're looking for here, or is it a known value?



    If the text is a known value, you can either use Constant/String or Variable or Parameter here, rather than CodeExpression.



    If you're calculating it, give us some more information about where is it coming from and we can try to help with the code.



  • william_roe's avatar
    william_roe
    Super Contributor
    Part of the value is a constant (i.e. Purchase Order 28 or Purchase Order 29) so I want to wait until the object text contains 'Purchase Order' before continuing. Remember this is not being done in script.
  • I don't think you need Code Expression here.  See my attachment.   A constant should work just fine.