Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Session.php

function Session::execute

script execution method chaining, e.g.,

  • $session->execute($jsonScript) - fallback for legacy JSON Wire Protocol
  • $session->execute()->method() - chaining

Return value

mixed

File

vendor/lullabot/php-webdriver/lib/WebDriver/Session.php, line 525

Class

Session
WebDriver\Session class

Namespace

WebDriver

Code

public function execute() {
    // execute script
    if (func_num_args() > 0) {
        $execute = $this->w3c ? new Execute($this->url . '/execute') : new LegacyExecute($this->url);
        $result = $execute->sync(func_get_arg(0));
        return $result;
    }
    // W3C method chaining
    return new Execute($this->url . '/execute');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal