From c3b0a78b062d382dada366143395eb311505832b Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Sun, 17 Nov 2024 17:11:58 +0100 Subject: [PATCH 1/3] `pressKey`: Fixing `@param string|array $chars` --- src/Codeception/Module/WebDriver.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Codeception/Module/WebDriver.php b/src/Codeception/Module/WebDriver.php index 57d4859..3487fc5 100644 --- a/src/Codeception/Module/WebDriver.php +++ b/src/Codeception/Module/WebDriver.php @@ -3149,22 +3149,22 @@ protected function matchFirstOrFail(WebDriverSearchContext $page, $selector): We /** * Presses the given key on the given element. - * To specify a character and modifier (e.g. Ctrl, Alt, Shift, Meta), pass an array for `$char` with + * To specify a character and modifier (e.g. Ctrl, Alt, Shift, Meta), pass an array for `$char` with * the modifier as the first element and the character as the second. - * For special keys, use the constants from [`Facebook\WebDriver\WebDriverKeys`](https://github.com/php-webdriver/php-webdriver/blob/main/lib/WebDriverKeys.php). + * For special keys, use the constants from [Facebook\WebDriver\WebDriverKeys](https://github.com/php-webdriver/php-webdriver/blob/main/lib/WebDriverKeys.php). * * ``` php * * $I->pressKey('#page', 'a'); // => olda - * $I->pressKey('#page', ['ctrl', 'a'],'new'); //=> new - * $I->pressKey('#page', ['shift', '111'],'1','x'); //=> old!!!1x - * $I->pressKey('descendant-or-self::*[@id='page']','u'); //=> oldu - * $I->pressKey('#name', ['ctrl', 'a'], \Facebook\WebDriver\WebDriverKeys::DELETE); //=>'' + * $I->pressKey('#page', ['ctrl', 'a'],'new'); // => new + * $I->pressKey('#page', ['shift', '111'], '1', 'x'); // => old!!!1x + * $I->pressKey('descendant-or-self::*[@id='page']', 'u'); // => oldu + * $I->pressKey('#name', ['ctrl', 'a'], \Facebook\WebDriver\WebDriverKeys::DELETE); // =>'' * ``` * * @param string|array|WebDriverBy $element - * @param array$chars Can be char or array with modifier. You can provide several chars. + * @param string|array $chars Can be char or array with modifier. You can provide several chars. * @throws ElementNotFound */ public function pressKey($element, ...$chars): void From 4a41a6cfe1173cbb93d69fce00e9c3e78ec96fb5 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Sun, 15 Dec 2024 21:35:03 +0100 Subject: [PATCH 2/3] Update WebDriver.php --- src/Codeception/Module/WebDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Codeception/Module/WebDriver.php b/src/Codeception/Module/WebDriver.php index 3487fc5..530583d 100644 --- a/src/Codeception/Module/WebDriver.php +++ b/src/Codeception/Module/WebDriver.php @@ -3164,7 +3164,7 @@ protected function matchFirstOrFail(WebDriverSearchContext $page, $selector): We * ``` * * @param string|array|WebDriverBy $element - * @param string|array $chars Can be char or array with modifier. You can provide several chars. + * @param string|list $chars Can be char or array with modifier. You can provide several chars. * @throws ElementNotFound */ public function pressKey($element, ...$chars): void From 622aaa0f8483a2631fbab068c31379d9ff3862ac Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Sun, 15 Dec 2024 21:44:18 +0100 Subject: [PATCH 3/3] Update WebDriver.php --- src/Codeception/Module/WebDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Codeception/Module/WebDriver.php b/src/Codeception/Module/WebDriver.php index 530583d..3bb7dc4 100644 --- a/src/Codeception/Module/WebDriver.php +++ b/src/Codeception/Module/WebDriver.php @@ -3164,7 +3164,7 @@ protected function matchFirstOrFail(WebDriverSearchContext $page, $selector): We * ``` * * @param string|array|WebDriverBy $element - * @param string|list $chars Can be char or array with modifier. You can provide several chars. + * @param string|array $chars Can be char or array with modifier. You can provide several chars. * @throws ElementNotFound */ public function pressKey($element, ...$chars): void