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.
This commit is contained in:
Eloy Lafuente (stronk7) 2019-04-04 00:54:45 +02:00
parent f3971a2d88
commit 31d7eaab5a

View File

@ -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"