We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c9909d5 + 5e3fa67 commit afd1e9dCopy full SHA for afd1e9d
tests/Js/WindowTest.php
@@ -2,6 +2,7 @@
2
3
namespace Behat\Mink\Tests\Driver\Js;
4
5
+use Behat\Mink\Exception\DriverException;
6
use Behat\Mink\Tests\Driver\TestCase;
7
8
final class WindowTest extends TestCase
@@ -108,4 +109,14 @@ public function testWindowMaximize(): void
108
109
110
$this->assertLessThanOrEqual(100, $session->evaluateScript($script));
111
}
112
+
113
+ public function testSwitchingToMissingWindow(): void
114
+ {
115
+ $this->getSession()->visit($this->pathTo('/window.html'));
116
+ $session = $this->getSession();
117
118
+ $this->expectException(DriverException::class);
119
120
+ $session->switchToWindow('inexistent_window');
121
+ }
122
0 commit comments