diff --git a/lib/tests/behat/behat_navigation.php b/lib/tests/behat/behat_navigation.php index 8ee9d1c3481..54cce4e10b9 100644 --- a/lib/tests/behat/behat_navigation.php +++ b/lib/tests/behat/behat_navigation.php @@ -945,6 +945,8 @@ class behat_navigation extends behat_base { $moreitemxpath = '//ul[@data-region=\'moredropdown\']/li/a[contains(normalize-space(.), ' . $tabname . ')]'; if ($morenode = $this->getSession()->getPage()->find('xpath', $moreitemxpath)) { $this->execute('behat_general::i_click_on', [$morenode, 'NodeElement']); + $xpath .= '//div[contains(@class,\'active\')]'; + array_shift($parentnodes); } } }