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

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

public class EditorElement
extends BaseElement

Models a WYSIWYG editor instance.

Since:
3.2M3
Version:
$Id: 5619e363889e4925781e61296ac6934181d29515 $

Constructor Summary
EditorElement(String fieldId)
          Creates a new instance that can be used to control the WYSIWYG editor that replaced the specified form field.
 
Method Summary
protected  org.openqa.selenium.WebElement getContainer()
           
 MenuBarElement getMenuBar()
           
 RichTextAreaElement getRichTextArea()
           
 org.openqa.selenium.WebElement getSourceTextArea()
           
 ToolBarElement getToolBar()
           
 void switchToSource()
          Switches to the Source editor by clicking on the "Source" tab item and waits for the source text area to be initialized.
 void switchToSource(boolean wait)
          Switches to the Source editor by clicking on the "Source" tab item.
 void switchToWysiwyg()
          Switches to the WYSIWYG editor by clicking on the "WYSIWYG" tab item and waits for the rich text area to be initialized.
 void switchToWysiwyg(boolean wait)
          Switches the WYSIWYG editor by clicking on the "WYSIWYG" tab item.
 EditorElement waitToLoad()
          Waits for the WYSIWYG content editor to load.
 
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

EditorElement

public EditorElement(String fieldId)
Creates a new instance that can be used to control the WYSIWYG editor that replaced the specified form field.

Parameters:
fieldId - the id of the text area field that was replaced by the WYSIWYG editor.
Method Detail

getMenuBar

public MenuBarElement getMenuBar()
Returns:
the menu bar

getToolBar

public ToolBarElement getToolBar()
Returns:
the tool bar

getRichTextArea

public RichTextAreaElement getRichTextArea()
Returns:
the rich text area

getSourceTextArea

public org.openqa.selenium.WebElement getSourceTextArea()
Returns:
the source text area

waitToLoad

public EditorElement waitToLoad()
Waits for the WYSIWYG content editor to load.


switchToSource

public void switchToSource()
Switches to the Source editor by clicking on the "Source" tab item and waits for the source text area to be initialized.


switchToSource

public void switchToSource(boolean wait)
Switches to the Source editor by clicking on the "Source" tab item.

Parameters:
wait - true to wait for the source text area to be initialized, false otherwise

switchToWysiwyg

public void switchToWysiwyg()
Switches to the WYSIWYG editor by clicking on the "WYSIWYG" tab item and waits for the rich text area to be initialized.


switchToWysiwyg

public void switchToWysiwyg(boolean wait)
Switches the WYSIWYG editor by clicking on the "WYSIWYG" tab item.

Parameters:
wait - true to wait for the rich text area to be initialized, false otherwise

getContainer

protected org.openqa.selenium.WebElement getContainer()
Returns:
the element that wraps the editor


Copyright © 2004-2013 XWiki. All Rights Reserved.