diff --git a/enrol/tests/behat/behat_enrol.php b/enrol/tests/behat/behat_enrol.php index ca24f1d6a43b6..1cde57b01a558 100644 --- a/enrol/tests/behat/behat_enrol.php +++ b/enrol/tests/behat/behat_enrol.php @@ -100,7 +100,8 @@ public function i_enrol_user_as($userfullname, $rolename) { // We have a div here, not a tr. $this->execute('behat_forms::i_set_the_field_to', array(get_string('selectusers', 'enrol_manual'), $userfullname)); - $this->execute("behat_forms::press_button", get_string('enroluserscohorts', 'enrol_manual')); + $enrolusers = get_string('enrolusers', 'enrol_manual'); + $this->execute('behat_general::i_click_on_in_the', [$enrolusers, 'button', $enrolusers, 'dialogue']); } else { $this->execute('behat_forms::i_set_the_field_to', array(get_string('assignrole', 'role'), $rolename));