From cdb0af69e15a8d5ba3dd1d2973faa8fac435295c Mon Sep 17 00:00:00 2001 From: Shamim Rezaie Date: Mon, 1 Jun 2020 03:45:32 +1000 Subject: [PATCH] MDL-68353 theme_classic: Update filepicker xpath selector --- .../behat/behat_theme_classic_behat_repository_upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/theme/classic/tests/behat/behat_theme_classic_behat_repository_upload.php b/theme/classic/tests/behat/behat_theme_classic_behat_repository_upload.php index 369b91e390919..365548f9454ff 100644 --- a/theme/classic/tests/behat/behat_theme_classic_behat_repository_upload.php +++ b/theme/classic/tests/behat/behat_theme_classic_behat_repository_upload.php @@ -59,11 +59,11 @@ protected function get_filepicker_node($filepickerelement) { $exception ); } else { - // Gets the ffilemanager node specified by the locator which contains the filepicker container. + // Gets the filemanager node specified by the locator which contains the filepicker container. $filepickerelement = behat_context_helper::escape($filepickerelement); $filepickercontainer = $this->find( 'xpath', - "//input[./@id = //label[normalize-space(.)=$filepickerelement]/@for]" . + "//input[./@id = substring-before(//p[normalize-space(.)=$filepickerelement]/@id, '_label')]" . "//ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' felement ')]", $exception );