Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Checkbox to return its value if checked
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Zemek committed Aug 3, 2014
1 parent d2aa97b commit 833f3c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Behat/Mink/Driver/SahiDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ public function getValue($xpath)
return $this->evaluateScript($function);
}
} elseif ('checkbox' === $type) {
return $this->isChecked($xpath);
$checkbox = $this->client->findByXPath($xpath);
return $checkbox->isChecked() ? $checkbox->getValue() : null;
} elseif ('select' === $tag && 'multiple' === $this->getAttribute($xpath, 'multiple')) {
$xpathEscaped = json_encode(sprintf('(%s)[1]', $xpath));

Expand Down

0 comments on commit 833f3c6

Please sign in to comment.