You are here

public function PermissionsByTermDrupalSubContext::iScrollToElementWithId in Permissions by Term 8.2

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

Parameters

string $id:

File

tests/src/Behat/Context/permissions_by_term.behat.inc, line 178

Class

PermissionsByTermDrupalSubContext
Class PermissionsByTermContext

Namespace

Drupal\Tests\permissions_by_term\Behat\PermissionsByTermDrupalSubContext

Code

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