Forum Discussion
Hi Colin,
> VisibleOnScreen which (as far as I can tell) is a TestComplete specific property and is accurate.
I would love it to be always true, but I had a personal experience with some web application when, as I wrote, all reasonable properties (Visible, VisibleOnScreen, Height, Width, ...) indicated that the element must be visible, but in reality it was not because of the reasons I mentioned (some of its parents was not visible (I was lucky enough that it was enough to check parents for no more than three levels up) or the element was not shown because of class SCC setting, etc.).
I am not sure that this is a problem of TestComplete, but rather realities of 'modern dynamic and adaptive' web applications.
Otherwise I completely agree with your comment.
Interesting.
I've had plenty of instances of "Visible" being true when it's not.
But VisibleOnScreen has always been accurate for me. I'll keep an eye out for that one!
Would still like confirmation of what shows in the object browser in the IDE.
- AlexKaras9 years agoChampion Level 3
> But VisibleOnScreen has always been accurate for me. I'll keep an eye out for that one!
I will as well.
BTW, what was the value of VisibleOnScreen when the element was out of view (i.e. beyond the visible part of the page)?
I used to try to avoid VisibleOnScreen property because it seems to be too 'fragile' for me. It is set to False whenever the object is not immediately visible to the user (i.e. when the part of the form is overlapped with some other UI element, or when the tested application is overlapped by TestComplete on a single-monitor systems, etc.). That is why I am always trying to find some other property(ies) instead of VisibleOnScreen.
- Colin_McCrae9 years agoCommunity Hero
I've always found it to be pretty good.
If an object is off screen (but would scroll on if required), I find Visibe = True, Enabled = True but VisibleOnScreen = False. Which is what you'd want.
Same with hidden objects (in my current .NET/Delphi project), overlapping objects in web applications etc etc.
It actually helped flag up a problem with the Delphi stuff I'm currently working on as the main menu of a module was re-generating it's buttons each time it re-drew without destroying the previous instances as it should have been.
I always have TC minimised during a run (and the Excel sheet driving it set to invisible) to avoid overlap problems like that.
Related Content
Recent Discussions
- 20 minutes agoashly