public function waitForElementUntilIsEnabled($timeOutSeconds = 5) { $wait = new WebDriverWait($timeOutSeconds); $element = $wait->until($this, "isEnabled", array()); return $this; }