Skip to content

Commit 7ae4451

Browse files
author
Development User
committed
Added new exception when not Webdriver is not enabled
1 parent ff9879c commit 7ae4451

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

module/VisualCeption.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,14 @@ public function __construct ($config)
4040
* Event hook before a test starts
4141
*
4242
* @param \Codeception\TestCase $test
43+
* @throws \Exception
4344
*/
4445
public function _before (\Codeception\TestCase $test)
4546
{
47+
if ( !$this->hasModule("WebDriver")) {
48+
throw new \Exception("VisualCeption uses the WebDriver. Please be sure that this module is activated.");
49+
}
50+
4651
$this->webDriverModule = $this->getModule("WebDriver");
4752
$this->webDriver = $this->webDriverModule->webDriver;
4853

0 commit comments

Comments
 (0)