We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d0c9aa5 + 039c9d3 commit a9a3deeCopy full SHA for a9a3dee
lib/WebDriver/Session.php
@@ -455,16 +455,16 @@ public function alert()
455
456
/**
457
* script execution method chaining, e.g.,
458
- * - $session->execute() - fallback for legacy JSON Wire Protocol
+ * - $session->execute($jsonScript) - fallback for legacy JSON Wire Protocol
459
* - $session->execute()->method() - chaining
460
*
461
* @return mixed
462
*/
463
public function execute()
464
{
465
// execute script
466
- if (func_num_args() === 0) {
467
- $result = $this->curl('POST', '/execute');
+ if (func_num_args() > 0) {
+ $result = $this->curl('POST', '/execute', func_get_arg(1));
468
469
return $result['value'];
470
}
0 commit comments