private function FeatureContext::findLinksInRegion in Acquia Lift Connector 7.2
Helper function to return any link in a particular region marching the link by id, title, text, or alt.
Parameters
string $link: link id, title, text or image alt
$region: region identifier from configuration.
Return value
array|null An array of \Behat\Mink\Element\NodeElement objects.
3 calls to FeatureContext::findLinksInRegion()
- FeatureContext::assertLinkVisibleRegion in behat-tests/
features/ bootstrap/ FeatureContext.php - @Then I should visibly see the link :link in the :region( region)
- FeatureContext::assertMenuItemInactive in behat-tests/
features/ bootstrap/ FeatureContext.php - @Given /^menu item "([^"]*)" should be "(active|inactive)"$/
- FeatureContext::assertNotLinkVisibleRegion in behat-tests/
features/ bootstrap/ FeatureContext.php - @Then I should not visibly see the link :link in the :region( region)
File
- behat-tests/
features/ bootstrap/ FeatureContext.php, line 914
Class
- FeatureContext
- Defines application features from the specific context.
Code
private function findLinksInRegion($link, $region) {
$regionObj = $this
->getRegion($region);
$session = $this
->getSession();
$escapedValue = $session
->getSelectorsHandler()
->xpathLiteral($link);
$elements = $regionObj
->findAll('named', array(
'link',
$escapedValue,
));
return $elements;
}