Skip to content

Commit

Permalink
MDL-60469 behat: Replace I press with I click on
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Oct 19, 2017
1 parent 6ba05a7 commit 0d18af4
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/tests/behat/behat_forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,7 @@ class behat_forms extends behat_base {
* @param string $button
*/
public function press_button($button) {

// Ensures the button is present.
$buttonnode = $this->find_button($button);
// Focus on button to ensure it is in viewport, before pressing it.
if ($this->running_javascript()) {
$buttonnode->focus();
}
$buttonnode->press();
$this->execute('behat_general::i_click_on', [$button, 'button']);
}

/**
Expand Down

0 comments on commit 0d18af4

Please sign in to comment.