org.xwiki.test.ui.po.editor.wysiwyg
Class RichTextAreaElement

java.lang.Object
  extended by org.xwiki.test.ui.po.BaseElement
      extended by org.xwiki.test.ui.po.editor.wysiwyg.RichTextAreaElement

public class RichTextAreaElement
extends BaseElement

Models the rich text area of the WYSIWYG content editor.

Since:
3.2M3
Version:
$Id: 2321ac7d0af61deb87554319b2c4d069bcf6b1fe $

Constructor Summary
RichTextAreaElement(org.openqa.selenium.WebElement iframe)
          Creates a new rich text area element.
 
Method Summary
 void clear()
          Clears the content of the rich text area.
 void click()
          Clicks on the rich text area.
 Object executeScript(String script, Object... arguments)
          Executes the given script in the context of the rich text area.
 String getContent()
           
 String getText()
           
 void sendKeys(CharSequence... keysToSend)
          Simulate typing in the rich text area.
 void setContent(String content)
          Sets the HTML content of the rich text area
 
Methods inherited from class org.xwiki.test.ui.po.BaseElement
executeJavascript, getDriver, getUtil, makeAlertDialogSilent, makeConfirmDialogSilent, makeElementVisible, makeElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilElementDisappears, waitUntilElementEndsWithAttributeValue, waitUntilElementHasAttributeValue, waitUntilElementHasTextContent, waitUntilElementIsVisible, waitUntilElementsAreVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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


Copyright © 2004-2013 XWiki. All Rights Reserved.