diff --git a/grade/tests/behat/behat_grade.php b/grade/tests/behat/behat_grade.php index b5e6dde3e3b..02a4d1e0037 100644 --- a/grade/tests/behat/behat_grade.php +++ b/grade/tests/behat/behat_grade.php @@ -226,7 +226,7 @@ class behat_grade extends behat_base { $inputxpath = "//input[@class='idnumber'][" . "parent::li[@class='item'][text()='" . $gradeitem . "']" . " | " . - "parent::li[@class='categoryitem' | @class='courseitem']" . + "parent::li[@class='categoryitem' or @class='courseitem']" . "/parent::ul/parent::li[starts-with(text(),'" . $gradeitem . "')]" . "]"; $this->execute('behat_forms::i_set_the_field_with_xpath_to', array($inputxpath, $idnumber));