Novari-QA
8 years agoFrequent Contributor
WaitProperty on styles?
I am trying to wait on an object that i know exsists but the application needs to wait on the style="display: block;".
obj.WaitProperty("style", "display: block", 1); // doesn't work
obj.WaitProperty("Enabled", true, 1); //won't work because the object is enabled but the style is "display: none" until an operation is completed.
Thoughts? Ive tried this function ive created however, there has to be an easier way.
function YieldUntilVisibleOnScreen(obj, timeout = 10000) { var iteration = 0; var delay = 500; var maxIteration = timeout/delay; while(obj.VisibleOnScreen == false) { if(iteration >= maxIteration) return false; aqUtils.Delay(delay); iteration += delay; } return true; }