Forum Discussion

weiwongfaye's avatar
weiwongfaye
Occasional Contributor
14 years ago

Why the "VisibleOnScreen" property

 Why the "VisibleOnScreen" property shows false while the control is actually visible to me.



 I use the spy tool to capture a button in my application(keep the button show all the time), the property "Visible" is true while "VisibleOnScreen" is false. plus,nothing cover the button during my checking.  (Other button seems fine)



 I have wrote a script to check VisibleOnScreen property and it work. Recently, it doesn't and I check the reason it is caused by this property always shows false. (I used refresh fuction, still not work).



 

 What's the exactly difference between "Visible" and "VisibleOnScreen"? while user can see the control then the VisibleOnScreen property should be true, right?





TestComplete 7.5

2 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Jack,



    > What's the exactly difference between "Visible" and "VisibleOnScreen"?

    As per TC help: Visible property is True if the object is visible to users, otherwise False. VisibleOnScreen property is True if any part of the object is currently visible on screen, otherwise False.



    So, the VisibleOnScreen will be True only if the object is drawn on the screen, is visible and is not overlapped by any other one (e.g. if the target object is overlapped by TC's spy tool window then its (target object's) VisibleOnScreen will be False).

    The Visible is True if object supposed to be drawn on the screen but may be not visible at the moment for example because the part of the window with this object is moved out of the screen boundaries.



    Does the above make things more clear?