diff --git a/enrol/tests/behat/add_to_group.feature b/enrol/tests/behat/add_to_group.feature index 269f5c66935..8ece9defe0f 100644 --- a/enrol/tests/behat/add_to_group.feature +++ b/enrol/tests/behat/add_to_group.feature @@ -28,9 +28,8 @@ Feature: Users can be added to multiple groups at once And I am on "Course 1" course homepage And I follow "Participants" And I click on "Edit groups for \"Student 1\"" "link" in the "student1" "table_row" - And I click on ".form-autocomplete-downarrow" "css_element" in the "student1" "table_row" + And I open the autocomplete suggestions list in the "student1" "table_row" And I click on "Group 1" item in the autocomplete list - And I click on ".form-autocomplete-downarrow" "css_element" in the "student1" "table_row" And I click on "Group 2" item in the autocomplete list And I press the escape key And I click on "Save changes" "link" in the "student1" "table_row" diff --git a/lib/tests/behat/behat_forms.php b/lib/tests/behat/behat_forms.php index 2e60f1ce073..fc7b7e5b3f6 100644 --- a/lib/tests/behat/behat_forms.php +++ b/lib/tests/behat/behat_forms.php @@ -718,7 +718,7 @@ class behat_forms extends behat_base { public function i_open_the_autocomplete_suggestions_list($container = null, $containertype = null) { $csstarget = ".form-autocomplete-downarrow"; if ($container && $containertype) { - $this->execute('behat_general::i_click_on', [$csstarget, 'css_element', $container, $containertype]); + $this->execute('behat_general::i_click_on_in_the', [$csstarget, 'css_element', $container, $containertype]); } else { $this->execute('behat_general::i_click_on', [$csstarget, 'css_element']); }