Forum Discussion

swati15gupta's avatar
swati15gupta
Regular Visitor
10 years ago

object properties in testcomplete, shows object.exists = true but object.visibleOnScreen =false

while finding object properties in testcomplete,  it shows object.exists = true, object.visible =true but object.visibleOnScreen = false, so what should we do in such scenarios

as it is working fine for 1 product but not for other one other has object.exists = true, object.visible =true but object.visibleOnScreen = true

3 Replies

  • In the first scenario, is the object actually visible on the screen? You don't say?

     

    It is perfectly possible for an object to exist, be visible (and enabled) but not visible on screen. You may need to scroll to it.

     

    You also don't say what type of control. Or what type of application.

     

    There is not enough information in your post to give you anything much without more details ....

    • djadhav's avatar
      djadhav
      Regular Contributor

      What to do in such scenarios depends on what you're trying to accomplish. It's perfectly normal to have the Exists and Visible properties True, while VisibleOnScreen as false. e.g. Any object on the footer of this page (that you don't see on the screen) as of now should be displaying such behavior. If you scroll to the footer of this page and refresh the properties (in the object browser), it'll show all of them as true.

      So what exactly is this stopping you from doing?

      • rrivest's avatar
        rrivest
        Contributor

        A quick check is when "VisibleOnScreen" == false, use YourObject.ScrollIntoView() in order to scroll it up...

        Also.... the object might be the wrong one, and part of another pre-loaded component that is actually not displayed (like with tabbed pages)...

         

        Also... remember that the object VisibleOnScreen property is affected if you are checking while coding :)