From 44160cf213063a0bf4a3b7a49a02f1a3d954012f Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Thu, 4 Apr 2019 00:54:45 +0200 Subject: [PATCH] MDL-65087 behat: Select the proper search button via xpath By adding the "Search" aria label to a number of elements any search of "Search" buttons, previously working in other parts of the UI are not found anymore (because the hidden ones are found before). So, moving to click via xpath. Ideally we should be able to find the target button in an easier, human readable way. But there aren't many ids, names around to make it easier. --- grade/report/history/tests/behat/basic_functionality.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grade/report/history/tests/behat/basic_functionality.feature b/grade/report/history/tests/behat/basic_functionality.feature index 119bd083f92..06a951883d7 100644 --- a/grade/report/history/tests/behat/basic_functionality.feature +++ b/grade/report/history/tests/behat/basic_functionality.feature @@ -61,7 +61,7 @@ Feature: A teacher checks the grade history report in a course # Test filtering by student. And I press "Select users" And I set the field with xpath "//form/input[@class='usp-search-field']" to "Student 1" - And I press "Search" + And I click on "Search" "button" in the "//div[@class='usp-search']" "xpath_element" And I set the field with xpath "//div[@class='usp-checkbox']/input" to "1" And I press "Finish selecting users" And I press "Submit"