Forum Discussion

ThomasCasserly's avatar
ThomasCasserly
Frequent Contributor
2 years ago
Solved

WaitProperty not detecting that property is not at expected value

Hi all, 

 

I have a WaitProperty step in my keyword test, I am trying to check if a button is enabled or not before the test proceeds, so have selected the button as the object and "Enabled" property as the value to check, with the Property value set to True.

Issue is that when I run the test, with the button disabled, the test does not stop on the WaitProperty operation, so appears to not be checking the Enabled status of the button. See screenshots for details

4 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    The PropertyName should be Enabled and not e.g. Aliases.buttonMybtn.Enabled.

     

    For example,

     

    function Test1()
    {
        Aliases.buttonMybtn.WaitProperty("Enabled", true, -1);
    }

     

     

     

    • ThomasCasserly's avatar
      ThomasCasserly
      Frequent Contributor

      Thanks for that, I thought that selecting the property as per my original screenshot would just select the "Enabled" property. Didn't realise that it was looking for a property named with the full alias.

    • ThomasCasserly's avatar
      ThomasCasserly
      Frequent Contributor

      Ok, didn't realise that was the case. I thought all test steps would cause the test to stop if they couldn't be completed. Thanks.