Skip to content

Commit 81b562c

Browse files
Update WebDriver.php: executeJS: Removing jQuery (#127)
1 parent 397c2f0 commit 81b562c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Codeception/Module/WebDriver.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2875,16 +2875,13 @@ public function waitForJS(string $script, int $timeout = 5): void
28752875
}
28762876

28772877
/**
2878-
* Executes custom JavaScript.
2879-
*
2880-
* This example uses jQuery to get a value and assigns that value to a PHP variable:
2878+
* Executes JavaScript commands.
28812879
*
28822880
* ```php
28832881
* <?php
2884-
* $myVar = $I->executeJS('return $("#myField").val()');
2882+
* $myVar = $I->executeJS('return document.getElementById("myField").value');
28852883
*
2886-
* // additional arguments can be passed as array
2887-
* // Example shows `Hello World` alert:
2884+
* // Additional arguments can be passed as array. E.g. this will alert `Hello World`:
28882885
* $I->executeJS("window.alert(arguments[0])", ['Hello world']);
28892886
* ```
28902887
*

0 commit comments

Comments
 (0)