mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Merge pull request #46 from jeffreyguo/pulls/select-radiobutton-by-type
find radiobutton by its type
This commit is contained in:
commit
e3ccf1c733
@ -648,9 +648,10 @@ JS;
|
||||
*/
|
||||
public function iSelectTheRadioButton($radioLabel) {
|
||||
$session = $this->getSession();
|
||||
$radioButton = $session->getPage()->findField($radioLabel);
|
||||
$radioButton = $session->getPage()->find('named', array(
|
||||
'radio', $this->getSession()->getSelectorsHandler()->xpathLiteral($radioLabel)
|
||||
));
|
||||
assertNotNull($radioButton);
|
||||
assertEquals('radio', $radioButton->getAttribute('type'));
|
||||
$session->getDriver()->click($radioButton->getXPath());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user