WebDriverTest.php 563 B

12345678910111213141516171819
  1. <?php
  2. namespace Behat\Mink\Tests\Driver\Custom;
  3. use Behat\Mink\Driver\Selenium2Driver;
  4. use Behat\Mink\Tests\Driver\TestCase;
  5. class WebDriverTest extends TestCase
  6. {
  7. public function testGetWebDriverSessionId()
  8. {
  9. /** @var Selenium2Driver $driver */
  10. $driver = $this->getSession()->getDriver();
  11. $this->assertNotEmpty($driver->getWebDriverSessionId(), 'Started session has an ID');
  12. $driver = new Selenium2Driver();
  13. $this->assertNull($driver->getWebDriverSessionId(), 'Not started session don\'t have an ID');
  14. }
  15. }