Example #1
0
 /**
  * @return bool
  * @throws WebDriverException
  */
 public function isEnabled()
 {
     try {
         return $this->element->isEnabled();
     } catch (WebDriverException $exception) {
         $this->dispatchOnException($exception);
     }
 }
 /**
  * Wait until an element is no longer attached to the DOM.
  *
  * @param WebDriverElement $element The element to wait for.
  * @return bool WebDriverExpectedCondition false if the element is still
  *         attached to the DOM, true otherwise.
  */
 public static function stalenessOf(WebDriverElement $element)
 {
     return new WebDriverExpectedCondition(function ($driver) use($element) {
         try {
             $element->isEnabled();
             return false;
         } catch (StaleElementReferenceException $e) {
             return true;
         }
     });
 }