diff --git a/src/lib/Behat/Component/Fields/RichText.php b/src/lib/Behat/Component/Fields/RichText.php index 42e5c07096..15fda86f61 100644 --- a/src/lib/Behat/Component/Fields/RichText.php +++ b/src/lib/Behat/Component/Fields/RichText.php @@ -175,8 +175,7 @@ private function executeCommand(string $commandName): void private function clickElementsToolbarButton(string $buttonText): void { $script = sprintf( - "Array.from(document.querySelectorAll('%s %s')).filter(e => e.textContent =='%s')[0].click()", - $this->getLocator('additionalToolbar')->getSelector(), + "Array.from(document.querySelectorAll('%s')).filter(e => e.textContent =='%s')[0].click()", $this->getLocator('toolbarElement')->getSelector(), $buttonText );