Skip to content

Commit 57611e1

Browse files
pressKey: Fixing @param string|array<string|string> $chars (#138)
1 parent 5158e96 commit 57611e1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Codeception/Module/WebDriver.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3149,22 +3149,22 @@ protected function matchFirstOrFail(WebDriverSearchContext $page, $selector): We
31493149

31503150
/**
31513151
* Presses the given key on the given element.
3152-
* To specify a character and modifier (e.g. <kbd>Ctrl</kbd>, Alt, Shift, Meta), pass an array for `$char` with
3152+
* To specify a character and modifier (e.g. <kbd>Ctrl</kbd>, <kbd>Alt</kbd>, <kbd>Shift</kbd>, <kbd>Meta</kbd>), pass an array for `$char` with
31533153
* the modifier as the first element and the character as the second.
3154-
* For special keys, use the constants from [`Facebook\WebDriver\WebDriverKeys`](https://github.com/php-webdriver/php-webdriver/blob/main/lib/WebDriverKeys.php).
3154+
* For special keys, use the constants from [Facebook\WebDriver\WebDriverKeys](https://github.com/php-webdriver/php-webdriver/blob/main/lib/WebDriverKeys.php).
31553155
*
31563156
* ``` php
31573157
* <?php
31583158
* // <input id="page" value="old">
31593159
* $I->pressKey('#page', 'a'); // => olda
3160-
* $I->pressKey('#page', ['ctrl', 'a'],'new'); //=> new
3161-
* $I->pressKey('#page', ['shift', '111'],'1','x'); //=> old!!!1x
3162-
* $I->pressKey('descendant-or-self::*[@id='page']','u'); //=> oldu
3163-
* $I->pressKey('#name', ['ctrl', 'a'], \Facebook\WebDriver\WebDriverKeys::DELETE); //=>''
3160+
* $I->pressKey('#page', ['ctrl', 'a'],'new'); // => new
3161+
* $I->pressKey('#page', ['shift', '111'], '1', 'x'); // => old!!!1x
3162+
* $I->pressKey('descendant-or-self::*[@id='page']', 'u'); // => oldu
3163+
* $I->pressKey('#name', ['ctrl', 'a'], \Facebook\WebDriver\WebDriverKeys::DELETE); // =>''
31643164
* ```
31653165
*
31663166
* @param string|array|WebDriverBy $element
3167-
* @param array<string|string[]>$chars Can be char or array with modifier. You can provide several chars.
3167+
* @param string|array<string, string> $chars Can be char or array with modifier. You can provide several chars.
31683168
* @throws ElementNotFound
31693169
*/
31703170
public function pressKey($element, ...$chars): void

0 commit comments

Comments
 (0)