diff --git a/lang/en/access.php b/lang/en/access.php index 15bda41563a..465fc099742 100644 --- a/lang/en/access.php +++ b/lang/en/access.php @@ -28,7 +28,7 @@ $string['accesskey'] = 'Access key, {$a}'; $string['accessstatement'] = 'Accessibility statement'; $string['activitynext'] = 'Next activity'; $string['activityprev'] = 'Previous activity'; -$string['breadcrumb'] = 'Navigation bar'; +$string['breadcrumb'] = 'Breadcrumb'; $string['eventcontextlocked'] = 'Context frozen'; $string['eventcontextunlocked'] = 'Context unfrozen'; $string['hideblocka'] = 'Hide {$a} block'; diff --git a/lib/tests/behat/behat_navigation.php b/lib/tests/behat/behat_navigation.php index 68120314c8a..599bf8d1923 100644 --- a/lib/tests/behat/behat_navigation.php +++ b/lib/tests/behat/behat_navigation.php @@ -1395,9 +1395,10 @@ class behat_navigation extends behat_base { * @Given /^I follow the breadcrumb "(?P(?:[^"]|\\")*)"$/ */ public function go_to_breadcrumb_location(string $pagename): void { + $breadcrumblabel = get_string('breadcrumb', 'access'); $link = $this->getSession()->getPage()->find( 'xpath', - "//nav[@aria-label='Navigation bar']/ol/li[last()][contains(normalize-space(.), '" . $pagename . "')]" + "//nav[@aria-label='$breadcrumblabel']/ol/li[last()][contains(normalize-space(.), '$pagename')]" ); if (!$link) { $this->execute("behat_general::i_click_on_in_the", [$pagename, 'link', 'page', 'region']);