diff --git a/course/tests/behat/behat_course.php b/course/tests/behat/behat_course.php index ed41a46fad9..1f16af605b6 100644 --- a/course/tests/behat/behat_course.php +++ b/course/tests/behat/behat_course.php @@ -250,7 +250,7 @@ class behat_course extends behat_base { // Clicks the selected activity if it exists. $activityxpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' modchooser ')]" . "/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' optioninfo ')]" . - "/descendant::span[contains(concat(' ', normalize-space(@class), ' '), ' optionname ')]" . + "/descendant::p[contains(concat(' ', normalize-space(@class), ' '), ' optionname ')]" . "[normalize-space(.)=$activityliteral]" . "/parent::a";