diff --git a/tests/features/bootstrap/VarbaseContext.php b/tests/features/bootstrap/VarbaseContext.php index fdf56334..f80f283e 100644 --- a/tests/features/bootstrap/VarbaseContext.php +++ b/tests/features/bootstrap/VarbaseContext.php @@ -577,17 +577,11 @@ public function iClickOnCommandButtonInTheRichTextEditorField($selectorCommand, throw new \Exception('Could not find an id for the rich text editor field : ' . $locator); } - // Find the command button by the select command. - $element = $this->getSession()->getPage()->find('xpath', "//button[span[text()='$selectorCommand']]"); - - if (is_null($element)) { - throw new \Exception("The $selectorCommand command button in the rich text editor field $locator was not found"); - } - $element->click(); - + $this->getSession()->executeScript("CKEDITOR.instances[\"$fieldId\"].execCommand( '$selectorCommand' );"); } + /** * Append text at the end of a rich text editor field WYSIWYG with content. *