shiva_ranabhat
10 years agoContributor
Counter not working in do-while loop?
Hi,
I wanted to delay a webpage until certain element appears OR certain wait-time has passed.
Here is my code:
var counter= 0;
do{
aqUtils.Delay(100);
counter+= 100;
obj = pagereport.NativeWebObject.Find("contentText", "Resource Activity Volumes");
}
while (! obj.Exists || counter<=5000);
During playback, even after 'Resource Activity Volumes' text appears, it keeps playing back... in a loop :mansad:
Best Regards,
Shiva
Try using WaitAliasChild like so:
Aliases.browser.pageRedOwlReports.formAspnetform.panelReportPanel.WaitAliasChild(cellResourceActivityVolumes,5000).Exists