public function FeatureContext::iClickOnOnTheRowContaining in Open Social 10.2.x
Same name and namespace in other branches
- 10.3.x tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickOnOnTheRowContaining()
@When /^I click "([^"]*)" on the row containing "([^"]*)"$/
File
- tests/
behat/ features/ bootstrap/ FeatureContext.php, line 1145
Class
- FeatureContext
- Defines application features from the specific context.
Namespace
Drupal\social\BehatCode
public function iClickOnOnTheRowContaining($link_name, $row_text) {
/** @var $row \Behat\Mink\Element\NodeElement */
$row = $this
->getSession()
->getPage()
->find('css', sprintf('table tr:contains("%s")', $row_text));
if (!$row) {
throw new \Exception(sprintf('Cannot find any row on the page containing the text "%s"', $row_text));
}
$row
->clickLink($link_name);
}