Skip to content

Commit d055c64

Browse files
Documented behaviour of openNewTab
Explaining weird behavior of sessionStorage, see https://stackoverflow.com/q/20879714/1668200
1 parent 237c6cb commit d055c64

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/Codeception/Module/WebDriver.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3252,17 +3252,16 @@ public function scrollTo($selector, $offsetX = null, $offsetY = null)
32523252
}
32533253

32543254
/**
3255-
* Opens a new browser tab (wherever it is possible) and switches to it.
3255+
* Opens a new browser tab and switches to it.
32563256
*
32573257
* ```php
32583258
* <?php
32593259
* $I->openNewTab();
32603260
* ```
3261-
* Tab is opened by using `window.open` javascript in a browser.
3262-
* Please note, that adblock can restrict creating such tabs.
3263-
*
3264-
* Can't be used with PhantomJS
3265-
*
3261+
* The tab is opened with JavaScript's `window.open()`, which means:
3262+
* * Some adblockers might restrict it.
3263+
* * The sessionStorage is copied to the new tab (contrary to a tab that was manually opened by the user)
3264+
* * It is not possible in PhantomJS.
32663265
*/
32673266
public function openNewTab()
32683267
{

0 commit comments

Comments
 (0)