Forum Discussion

TKRK's avatar
TKRK
Occasional Contributor
6 months ago
Solved

Not able to use Find Object and call object method in keyword tests to validate data

Call Object Method         find Object - I am using wText property     I am not sure where I am making a mistake.   The same test works fine with Propertycheck point...
  • rraghvani's avatar
    6 months ago

    The following example, will check if the object exists i.e. 'Click Me!' button. If it does exist, then it logs 'Object exists' else 'Object does not exist'.

    If the object does not exist, TC will wait a number of seconds before continuing. The delay is based on playback settings.

     

    To check the property value of an object, the object must exist.

  • rraghvani's avatar
    6 months ago

    The methods that you use, you should read the documentation of Result Value that's returned.

     

    For example, if the property checkpoint value matches, the checkpoint logs a success message, otherwise, it logs an error message. It does not throw an error. If the Find method does not match the search criteria, it returns a stub object that only contains the Exists property equal to False. It does not throw an error. Since these methods do not throw an error, try...catch will not work. Ensure you understand the difference.