From 1b67bb08c8b61ad7e5324ef07eaea2834772b818 Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Thu, 23 Aug 2018 11:07:40 +1200 Subject: [PATCH] Fix failing HTML button test step --- tests/behat/src/CmsFormsContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/behat/src/CmsFormsContext.php b/tests/behat/src/CmsFormsContext.php index f8f185728..0e01e9503 100644 --- a/tests/behat/src/CmsFormsContext.php +++ b/tests/behat/src/CmsFormsContext.php @@ -241,7 +241,7 @@ JS; if (null === $element) { // If it can't find the exact name, find one that starts with the phrase // Helpful for "Insert link" which has a conditional label for keyboard shortcut - $xpath = "//*[@aria-label^='" . $button . "']"; + $xpath = "//*[starts-with(@aria-label, '" . $button . "')]"; $element = $session->getPage()->find('xpath', $xpath); if (null === $element) {