Skip to content

Commit

Permalink
Fix hardcoded value
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyWay committed Apr 13, 2015
1 parent 96f42e4 commit acff615
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Extensions/Selenium.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ protected function findByValue($value, $element = 'input')
return $this->session->element('css selector', "{$element}[value='{$value}']");
} catch (NoSuchElement $e) {
try {
return $this->session->element('xpath', "//button[contains(text(),'Register')]");
return $this->session->element('xpath', "//button[contains(text(),'{$value}')]");
} catch (NoSuchElement $e) {
throw new InvalidArgumentException(
"Crap. Couldn't find an {$element} with a 'value' attribute of '{$value}'. We also looked " .
Expand Down

0 comments on commit acff615

Please sign in to comment.