diff --git a/mod/glossary/tests/behat/print_friendly_version.feature b/mod/glossary/tests/behat/print_friendly_version.feature index 58c724ff642..9e4bcf77c49 100644 --- a/mod/glossary/tests/behat/print_friendly_version.feature +++ b/mod/glossary/tests/behat/print_friendly_version.feature @@ -34,7 +34,7 @@ Feature: A teacher can choose whether to provide a printer-friendly glossary ent | Concept | Just a test concept | | Definition | Concept definition | Then "Printer-friendly version" "link" should exists - And "//*[contains(concat(' ', @class, ' '), ' printicon ')]/descendant::a[contains(@href, 'print.php')]" "xpath_element" should exists + And "//*[contains(concat(' ', @class, ' '), ' printicon ')][contains(@href, 'print.php')]" "xpath_element" should exists And I follow "Printer-friendly version" And I should see "Just a test concept" @@ -51,4 +51,4 @@ Feature: A teacher can choose whether to provide a printer-friendly glossary ent | Concept | Just a test concept | | Definition | Concept definition | Then "Printer-friendly version" "link" should not exists - And "//*[contains(concat(' ', @class, ' '), ' printicon ')]/descendant::a[contains(@href, 'print.php')]" "xpath_element" should not exists + And "//*[contains(concat(' ', @class, ' '), ' printicon ')][contains(@href, 'print.php')]" "xpath_element" should not exists