Forum Discussion

Adagio's avatar
Adagio
Frequent Contributor
4 years ago

Object's 'Exists' property returns false while the object still exists and visible on the UI

Hi,

 

Lately, I've been having issues with one of the program where I check the availability of an Object on the UI using the Exists property. The object is present on the UI and still the 'Exists' returns false. I've tried debugging it but still the same and not able to figure out why. It's has been working well till date, and suddenly behaving weird. 

 

The object's alias mapping hasn't changed at all.

 

Any help would be appreciated.

 

Thank you!!

5 Replies

    • Adagio's avatar
      Adagio
      Frequent Contributor

        Hi  @wam, 

      It just a conditional statement after the wait statement. The problem is, max wait is 20 seconds, and it's not able to identify the object on the UI (20 seconds later even when the object appears on the page within 5 seconds). Even though the Alias mapping hasn't changed.

       

      progLib.waitForVisibility(buttonClx);

      if(buttonClx.Exists){
      buttonClx.ClickButton();

      }

       

      Thank you!!

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Hi (been a while...but here I am).

        waitForVisibility appears to be custom code.  So, it's hard to say what's going on here without knowing what's happening in the other code.  You mention a "max wait" of 20 seconds, I'm assuming that's in that same waitForVisibility.  What happens after 20 seconds and it's still not visible?

         

        Additionally, it would be nice to see some more information about the object.  You say that the mapping hasn't changed... but has the application under test changed?  It could be visible, to you, on screen but the automation may not be able to find it due to some other factors.

         

        To help more:

         

        1) Can we see the code for waitForVisibility?  Please post it.

        2) Can you post a screenshot of the Object Browser of the object in question so we can see the full properties and hierarchy in the object tree?

        3) Can you post a screenshot of the mapping criteria you're using for the object?  Please make sure to include the NameMapping hierachy tree (as opposed to the Alias tree) for the object in question so we can see the relationship to other objects.