public function FeatureContext::iClickPostVisibilityDropdown in Open Social 8
Same name and namespace in other branches
- 8.2 tests/behat/features/bootstrap/FeatureContext.php \FeatureContext::iClickPostVisibilityDropdown()
@When /^I click the post visibility dropdown/
1 call to FeatureContext::iClickPostVisibilityDropdown()
- FeatureContext::iSelectPostVisibility in tests/
behat/ features/ bootstrap/ FeatureContext.php - @When I select post visibility :visibility
File
- tests/
behat/ features/ bootstrap/ FeatureContext.php, line 287
Class
- FeatureContext
- Defines application features from the specific context.
Code
public function iClickPostVisibilityDropdown() {
$locator = 'button#post-visibility';
$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();
}