Class RichTextAreaElement


  • @Unstable
    public class RichTextAreaElement
    extends BaseElement
    Represents the editing area of a WYSIWYG editor.
    Since:
    1.19
    Version:
    $Id: 6bdfd1dae1491681a4f010bc3d1c043ec0ad0362 $
    • Constructor Detail

      • RichTextAreaElement

        public RichTextAreaElement​(org.openqa.selenium.WebElement iframe)
        Creates a new rich text area element.
        Parameters:
        iframe - the in-line frame used by the rich text area
    • Method Detail

      • getText

        public String getText()
        Returns:
        the inner text of the rich text area
      • clear

        public void clear()
        Clears the content of the rich text area.
      • click

        public void click()
        Clicks on the rich text area.
      • sendKeys

        public void sendKeys​(CharSequence... keysToSend)
        Simulate typing in the rich text area.
        Parameters:
        keysToSend - the sequence of keys to by typed
      • executeScript

        public Object executeScript​(String script,
                                    Object... arguments)
        Executes the given script in the context of the rich text area.
        Parameters:
        script - the script to be executed
        arguments - the script arguments
        Returns:
        the result of the script execution
        See Also:
        JavascriptExecutor.executeScript(String, Object...)
      • getContent

        public String getContent()
        Returns:
        the HTML content of the rich text area
      • setContent

        public void setContent​(String content)
        Sets the HTML content of the rich text area.
        Parameters:
        content - the new HTML content