diff --git a/PHPWebDriver/WebDriverWait.php b/PHPWebDriver/WebDriverWait.php index 7350aab8e..0f6d1e87c 100644 --- a/PHPWebDriver/WebDriverWait.php +++ b/PHPWebDriver/WebDriverWait.php @@ -16,10 +16,11 @@ include_once('WebDriverExceptions.php'); class PHPWebDriver_WebDriverWait { - public function __construct($session, $timeout = 30, $poll_frequency = 0.5, $extra_arguments = array()) { + public function __construct($session, $timeout = 30, $poll_frequency = 0.5, $message='Element wait timed out after %s',$extra_arguments = array()) { $this->session = $session; $this->timeout = $timeout; $this->poll = $poll_frequency; + $this->message = $message; $this->extra_arguments = $extra_arguments; return $this; } @@ -39,9 +40,9 @@ public function until($func) { } throw new PHPWebDriver_TimeOutWebDriverError( sprintf( - 'Element wait timed out after %s', + $this->message, $this->timeout) . "\n\n"); } } -?> \ No newline at end of file +?>