You are here

public function PermissionsByTermDrupalSubContext::selectIndexInDropdown in Permissions by Term 8.2

@Then /^I select index (\d+) in dropdown named "([^"]*)"$/

File

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

Class

PermissionsByTermDrupalSubContext
Class PermissionsByTermContext

Namespace

Drupal\Tests\permissions_by_term\Behat\PermissionsByTermDrupalSubContext

Code

public function selectIndexInDropdown($index, $name) {
  $this
    ->getSession()
    ->evaluateScript('document.getElementsByName("' . $name . '")[0].selectedIndex = ' . $index . ';');
}