public function FeatureContext::iCheckTheRadioButton in Acquia Lift Connector 7.2
@When /^I check the "([^”]*)" radio button$/
File
- behat-tests/
features/ bootstrap/ FeatureContext.php, line 328
Class
- FeatureContext
- Defines application features from the specific context.
Code
public function iCheckTheRadioButton($radioLabel) {
$radioButton = $this
->getSession()
->getPage()
->findField($radioLabel);
if (null === $radioButton) {
throw new \Exception(sprintf('Cannot find radio button %s', $radioLabel));
}
$this
->getSession()
->getDriver()
->click($radioButton
->getXPath());
}