We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 126c515 commit 21a79f7Copy full SHA for 21a79f7
1 file changed
library/aik099/PHPUnit/Session/SharedSessionStrategy.php
@@ -98,7 +98,7 @@ protected function stopAndForgetSession()
98
*/
99
private function _switchToMainWindow()
100
{
101
- $this->_session->switchToWindow();
+ $this->_session->switchToWindow(); // Switch to the window before attempting to execute any window-based calls.
102
$actual_initial_window_name = $this->_session->getWindowName(); // Account for initial window rename.
103
104
foreach ( $this->_session->getWindowNames() as $name ) {
@@ -108,8 +108,9 @@ private function _switchToMainWindow()
108
109
$this->_session->switchToWindow($name);
110
$this->_session->executeScript('window.close();');
111
112
}
+
113
+ $this->_session->switchToWindow();
114
115
116
/**
0 commit comments