-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inform developers about non-working "rightClick" on Selenium Server 3…
….x (#407) Inform developers about non-working "rightClick" on Selenium Server 3.x
- Loading branch information
Showing
5 changed files
with
152 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace Behat\Mink\Tests\Driver\Custom; | ||
|
||
use Behat\Mink\Exception\DriverException; | ||
use Behat\Mink\Tests\Driver\Selenium2Config; | ||
use Behat\Mink\Tests\Driver\TestCase; | ||
|
||
final class SeleniumSupportTest extends TestCase | ||
{ | ||
public function testDriverCannotBeUsedInUnsupportedSelenium(): void | ||
{ | ||
if (Selenium2Config::getInstance()->isSeleniumVersionSupported()) { | ||
$this->markTestSkipped('This test applies to unsupported Selenium versions only.'); | ||
} | ||
|
||
$this->expectException(DriverException::class); | ||
$this->expectExceptionMessage('This driver requires Selenium version 3 or lower'); | ||
|
||
$this->createDriver()->start(); | ||
} | ||
|
||
public function testThatRightClickingCannotBeUsedInUnsupportedSelenium(): void | ||
{ | ||
if (Selenium2Config::getInstance()->isRightClickingInSeleniumSupported()) { | ||
$this->markTestSkipped('This test applies to Selenium 3 only.'); | ||
} | ||
|
||
$this->expectException(DriverException::class); | ||
$this->expectExceptionMessage(<<<TEXT | ||
Right-clicking via JsonWireProtocol is not possible on Selenium Server 3.x. | ||
Please use the "mink/webdriver-classic-driver" Mink driver or switch to Selenium Server 2.x. | ||
TEXT | ||
); | ||
|
||
$driver = $this->createDriver(); | ||
$driver->start(); | ||
$driver->rightClick('//'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters