diff --git a/tests/Custom/DesiredCapabilitiesTest.php b/tests/Custom/DesiredCapabilitiesTest.php index f62768e1..ae613fc9 100644 --- a/tests/Custom/DesiredCapabilitiesTest.php +++ b/tests/Custom/DesiredCapabilitiesTest.php @@ -44,7 +44,9 @@ public function testSetDesiredCapabilities() 'deviceType' => 'tablet', 'selenium-version' => '2.45.0' ); - $driver = $this->getSession()->getDriver(); + $session = $this->getSession(); + $session->start(); + $driver = $session->getDriver(); $driver->setDesiredCapabilities($caps); } -} \ No newline at end of file +} diff --git a/tests/Custom/WebDriverTest.php b/tests/Custom/WebDriverTest.php index 13734e99..a6f71e6d 100644 --- a/tests/Custom/WebDriverTest.php +++ b/tests/Custom/WebDriverTest.php @@ -9,8 +9,10 @@ class WebDriverTest extends TestCase { public function testGetWebDriverSessionId() { + $session = $this->getSession(); + $session->start(); /** @var Selenium2Driver $driver */ - $driver = $this->getSession()->getDriver(); + $driver = $session->getDriver(); $this->assertNotEmpty($driver->getWebDriverSessionId(), 'Started session has an ID'); $driver = new Selenium2Driver(); diff --git a/tests/Custom/WindowNameTest.php b/tests/Custom/WindowNameTest.php index fe2c94f0..bb6c2739 100644 --- a/tests/Custom/WindowNameTest.php +++ b/tests/Custom/WindowNameTest.php @@ -11,6 +11,7 @@ class WindowNameTest extends TestCase public function testPatternGetWindowNames() { $session = $this->getSession(); + $session->start(); $windowNames = $session->getWindowNames(); $this->assertArrayHasKey(0, $windowNames); @@ -23,6 +24,7 @@ public function testPatternGetWindowNames() public function testGetWindowName() { $session = $this->getSession(); + $session->start(); $this->assertRegExp(self::WINDOW_NAME_REGEXP, $session->getWindowName()); }