Forum Discussion

jimsmith_1's avatar
jimsmith_1
Contributor
14 years ago

VisibleOnScreen property always TRUE

I am trying to click a link in a list of regions in an asp.net web application.

The list of regions is too large to fit in the displayed window, so the user has to scroll down to find the correct region item to click.

I noticed in the TC Object Browser that the VisibleOnScreen property was TRUE for the regions that the user can see and FALSE for those that they cannot. So...I created a loop in my test that scrolls the list of region until the correct region has the VisibleOnScreen property set to TRUE.

This does not work because...

I have dicovered, by writing the property value to the log, that during test execution the region item's VisibleOnScreen property is always TRUE regardless of whether or not it can be seen on the screen.

Can anybody suggest why this might be?

Is there some other way I can check that I have scrolled down the list far enough to display a particular entry?



Thanks, Jim
  • igork's avatar
    igork
    Occasional Contributor
    Regarding the problem that I mentioned earlier.

    I've talked to the developers of the Flex app that I'm testing and found a solution.

    The 'Visible' property of the control itself is true, but the container in which it resides has the visibility value of false, therefore it is not visible to the user. So this means that I have to go up the tree to find a parent node that has a 'visible' value set to false to find out if the control is visible to the user.

    Like so:



    Aliases.SomeFlexLabel.FlexObject.parent.parent.parent.....parent.visible



    Shouldn't this be done automatically by TestComplete when accessing VisibleOnScreen property?
  • nevstafeva's avatar
    nevstafeva
    Occasional Contributor
    Hello! I have the same problem with VisibleOnScreen property in testing flex-application.



    It has "true" value everytime when this property just exist and has "false" value just in case when object does'n have this property.



    Moreover if i use watchlist for SomeObject.VisibleOnScreen i get right value (like in objectBrowser) but without type.



    I use version 9.31.3889.7 and i think it's really bug.
  • mkarlovich's avatar
    mkarlovich
    Occasional Contributor
    I can also attest that this property does not work.  I've had to resort to testing the state of other objects to find out if the object is actually visible on screen.  Seems like this is related to AJAX stuff, but I'm just conjecturing about. that.
  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor
    Running into this issue myself. It seems to default to True and if I log the property value it shows True, but if I add a breakpoint to the line that checks the property value and inspect it shows False. I have also tried every refresh method I could find, but no luck.

    Delphi application VCLClass = TCheckListBox

    Child object type = TextObject via text recognition

    TC Version 10.20
  • zaheer_akhter's avatar
    zaheer_akhter
    Occasional Contributor
    I am trying port my framework from TC7.5 to to TC10 . in the framework 7.5 we uses "visibleonscreen" to verify the data available



    Unfortunately in TC10 on same page I get visibleonscreen= false but in TC7.5 it was true,

    has anyone experirence this?
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Zaheer,

     


    You may need to refresh the object before accessing its properties.


     

  • Hi All,



    I am also facing the same issue in TC10, i have to click scroll to click on ceckbox which is not visible, but exists, enabled, visible, visibleonscreen all these property have same values for both visible and invisible properties. Can someone please help