diff --git a/enrol/tests/behat/add_to_group.feature b/enrol/tests/behat/add_to_group.feature
index 9e392448092..282f452751d 100644
--- a/enrol/tests/behat/add_to_group.feature
+++ b/enrol/tests/behat/add_to_group.feature
@@ -28,9 +28,9 @@ 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 open the autocomplete suggestions list
+    And I click on ".form-autocomplete-downarrow" "css_element" in the "student1" "table_row"
     And I click on "Group 1" item in the autocomplete list
-    And I open the autocomplete suggestions 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 key "27" in the field "Edit groups for \"Student 1\""
     And I click on "Save changes" "link" in the "student1" "table_row"