Esempio n. 1
0
 protected function onNotSuccessfulTest(\Exception $e)
 {
     if (is_object($this->driver)) {
         $this->driver->takeScreenshot("screenshots/" . uniqid() . ".png");
     }
     parent::onNotSuccessfulTest($e);
 }
 /**
  * @param null $save_as
  * @return string
  * @throws WebDriverException
  */
 public function takeScreenshot($save_as = null) {
   try {
     return $this->driver->takeScreenshot($save_as);
   } catch (WebDriverException $exception) {
     $this->dispatchOnException($exception);
   }
 }