usleep(100000); // .1s -> We wait because for some animations, the element might have a brief initial state of being visible, before it starts the transitioning. This pause makes the code more robust to that kind of cases.
if ($el && $el->displayed()) {
return$el;
}
}
sleep(1);
$timeout--;
}
thrownewWaitForElementTimeOutWebDriverError("Element not found while waiting");