public function waitForElementNotPresent($func, $arg) { while (true) { if (!$this->isElementPresent($func, $arg)) { return true; } usleep(5000); } }