You are here

public function FeatureContext::iClickGroupMemberDropdown in Open Social 10.0.x

Same name and namespace in other branches
  1. 8.9 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickGroupMemberDropdown()
  2. 10.3.x tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickGroupMemberDropdown()
  3. 10.1.x tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickGroupMemberDropdown()
  4. 10.2.x tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickGroupMemberDropdown()

@When /^I click the group member dropdown/

File

tests/behat/features/bootstrap/FeatureContext.php, line 358

Class

FeatureContext
Defines application features from the specific context.

Namespace

Drupal\social\Behat

Code

public function iClickGroupMemberDropdown() {
  $locator = '.add-users-dropbutton .dropdown-toggle';
  $session = $this
    ->getSession();
  $element = $session
    ->getPage()
    ->find('css', $locator);
  if ($element === NULL) {
    throw new \InvalidArgumentException(sprintf('Could not evaluate CSS selector: "%s"', $locator));
  }

  // Now click the element.
  $element
    ->click();
}