Forum Discussion
marinb
10 years agoFrequent Contributor
Kinda using something like this in many of my scripts (jscript), which works like a charm and you're able to give a maximum waiting time.
function WaitForObject(Object, MaxWait)
{
for (var i=0;i<MaxWait;i++)
{
if (Object.Exists)
{
if (Object.VisibleOnScreen && Object.Enabled)
{
Log.Message("Object found & enabled on screen!");
return Object;
}
}
}
Log.Error("Object not found in max number of iterations!");
return false;
}
Kate
9 years agoFrequent Contributor
How do you guys handle errors that go to the Log?
I would love to see my test green, but with checking while an element is visible or not visible I am getting this red error signs there, while overall test passes.