Forum Discussion

nisgupta's avatar
nisgupta
Valued Contributor
5 years ago

Visible and Exists property of Object

What is the difference between the Visible and Exists property of Object ?

 

Please advise 

Thanks

Nishchal

3 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Like their names say and as documented:

    -- Exists is set to true if the object does exist;

    -- Visible is set to true if the object is visible somewhere on the screen.

     

    • nisgupta's avatar
      nisgupta
      Valued Contributor

      AlexKaras 

      Thank you for the updates.

       

      How will you decide whether we should use the Exists or visisble property of object when both the properties are available ?

       

      Thanks

      Nishchal

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        It depends on your needs.

        .Exists property always exists for the objects and/or stubs obtained via .FindXXX() methods. For latters or if the object was destroyed/recreated .Exists will be set to false.

        Object may exist (for example, on the web page) but be not visible. In this case the value of .Visible will be false.