Ask a Question

Visible and Exists property of Object

nisgupta
Valued Contributor

Visible and Exists property of Object

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

 

Please advise 

Thanks

Nishchal

3 REPLIES 3
AlexKaras
Community Hero

Re: Visible and Exists property of Object

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.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
nisgupta
Valued Contributor

Re: Visible and Exists property of Object

@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
Community Hero

Re: Visible and Exists property of Object

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.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
cancel
Showing results for 
Search instead for 
Did you mean: