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

Breadcrumb

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

function Selenium2Driver::scrollElementIntoView

2 calls to Selenium2Driver::scrollElementIntoView()
Selenium2Driver::doMouseOver in vendor/lullabot/mink-selenium2-driver/src/Selenium2Driver.php
Selenium2Driver::dragTo in vendor/lullabot/mink-selenium2-driver/src/Selenium2Driver.php
Drag one element onto another.

File

vendor/lullabot/mink-selenium2-driver/src/Selenium2Driver.php, line 953

Class

Selenium2Driver
Selenium2 driver.

Namespace

Behat\Mink\Driver

Code

private function scrollElementIntoView(Element $element) : void {
    $script = <<<JS
    var e = arguments[0];
    e.scrollIntoView({ behavior: 'instant', block: 'end', inline: 'nearest' });
    var rect = e.getBoundingClientRect();
    return {'x': rect.left, 'y': rect.top};
JS;
    $this->executeJsOnElement($element, $script);
}

API Navigation

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