guillaume
13 years agoContributor
Object.VisibleOnScreen and The object does not exist
Hello.
I am using TC8 to do some webtesting. I extended the WaitPage method from browser with some additionnal requirement in order to be sure that the webpage has been completely loaded.
The method is looking for the jqueryLoader element in the webpage. If the object is found, it waits for the property VisibleOnScreen to be false. Here is a piece of the code used :
var objPage = Aliases.theBrowser.page;
[...]
var objLoader = objPage.WaitAliasChild("jqueryLoader", 500);
while(objLoader.Exists && objLoader.VisibleOnScreen){
Delay(500);
objLoader = objPage.WaitAliasChild("jqueryLoader", 0);
}
Unfortunately, at run time I sometime get the The object does not exist (An error occurred while calling the VisibleOnScreen method or property. The object or one of its parent objects does not exist).
I expected the objLoader.VisibleOnScreen to be called only when objLoader exists.
Did I misunderstood something ?
I am using TC8 to do some webtesting. I extended the WaitPage method from browser with some additionnal requirement in order to be sure that the webpage has been completely loaded.
The method is looking for the jqueryLoader element in the webpage. If the object is found, it waits for the property VisibleOnScreen to be false. Here is a piece of the code used :
var objPage = Aliases.theBrowser.page;
[...]
var objLoader = objPage.WaitAliasChild("jqueryLoader", 500);
while(objLoader.Exists && objLoader.VisibleOnScreen){
Delay(500);
objLoader = objPage.WaitAliasChild("jqueryLoader", 0);
}
Unfortunately, at run time I sometime get the The object does not exist (An error occurred while calling the VisibleOnScreen method or property. The object or one of its parent objects does not exist).
I expected the objLoader.VisibleOnScreen to be called only when objLoader exists.
Did I misunderstood something ?