From 6df049fa3c157208d4e3e6f5114c60cbec2aabd9 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 18 Oct 2017 11:04:28 +0800 Subject: [PATCH] MDL-60469 behat: Replace I press with I click on --- lib/tests/behat/behat_forms.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/tests/behat/behat_forms.php b/lib/tests/behat/behat_forms.php index 229b5c7e62b..c7d8116532b 100644 --- a/lib/tests/behat/behat_forms.php +++ b/lib/tests/behat/behat_forms.php @@ -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']); } /**