Forum Discussion
Hi Dev,
Have you checked manually if all found objects really exist on the page?
I think that they do exist and that FindAllChildren works correctly. But the real cause of your problem is that for web pages .Visible=True does not guarantee that the object is visible and accessible to the user. The object may not be visible because its parent, or grand-parent, or ... is not visible. Or because object's (or one of its parent's) .height or .width equals to zero. Or because its class is set to be hidden... You should investigate the page and try to find-out the reliable way of how to determine if the given object on the page is visible or not.
@ Alex
Yeah .... but he's using VisibleOnScreen which (as far as I can tell) is a TestComplete specific property and is accurate. (aka - if the object is off the bottom of the screen and needs scrolled to, it will return False)
I agree that I think they probably are present though. Just don't know why. Checking in the object browser will confirm (or not) their presence. Speaking to the devs may or may not find out why they're present ....
- AlexKaras9 years agoChampion Level 3
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.
- Colin_McCrae9 years agoCommunity Hero
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.
Related Content
- 6 months agomacheshmeh
Recent Discussions
- 3 hours agovladd1