You are here

protected function LayoutBuilderDisableInteractionsTest::movePointerTo in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderDisableInteractionsTest::movePointerTo()
  2. 9 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderDisableInteractionsTest::movePointerTo()

Moves mouse pointer to location of $selector.

Parameters

string $selector: CSS selector.

File

core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php, line 325

Class

LayoutBuilderDisableInteractionsTest
Tests the Layout Builder disables interactions of rendered blocks.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

protected function movePointerTo($selector) {
  $driver_session = $this
    ->getSession()
    ->getDriver()
    ->getWebDriverSession();
  $element = $driver_session
    ->element('css selector', $selector);
  $driver_session
    ->moveto([
    'element' => $element
      ->getID(),
  ]);
}