You are here

public function PermissionsByTermContext::iScrollToElementWithId in Permissions by Term 8

@Then /^I scroll to element with id "([^"]*)"$/

Parameters

string $id:

File

tests/src/Behat/Context/PermissionsByTermContext.php, line 158

Class

PermissionsByTermContext
Class PermissionsByTermContext

Namespace

Drupal\Tests\permissions_by_term\Behat\Context

Code

public function iScrollToElementWithId($id) {
  $this
    ->getSession()
    ->executeScript("\n                var element = document.getElementById('" . $id . "');\n                element.scrollIntoView( true );\n            ");
}