|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.selenium.client.TinyMce
public class TinyMce
Nested Class Summary | |
---|---|
static class |
TinyMce.Bookmark
Represents a TinyMCE bookmark. |
static class |
TinyMce.Format
|
static class |
TinyMce.ShortCut
|
static class |
TinyMce.SimpleToolbarButton
|
Field Summary | |
---|---|
static java.lang.String |
TINYMCE_LOCATOR
|
Constructor Summary | |
---|---|
TinyMce(ConfluenceSeleniumClient client,
Editor editor)
|
Method Summary | |
---|---|
void |
clickFormatMenuLink()
|
void |
clickHorizontalRuler()
|
InsertCharacterPopup |
clickInsertCharacter()
|
void |
clickInsertColAfter()
|
void |
clickInsertColBefore()
|
EmoticonPickerPopup |
clickInsertEmoticon()
|
void |
clickInsertRowAfter()
|
void |
clickInsertRowBefore()
|
InsertTablePopup |
clickInsertTable()
|
ColorPickerPopup |
clickMoreColors()
|
void |
clickOutsideEditor()
Used for clicking something outside of the TinyMCE editor that is (currently) known to not have any click-handler on it. |
void |
clickSelectedColor()
|
void |
clickToolbarButton(TinyMce.SimpleToolbarButton button)
|
void |
dispatchClickEventForSelector(java.lang.String selector)
Triggers ed.onClick.dispatch on TinyMCE |
void |
dispatchDoubleClickEventForSelector(java.lang.String selector)
Triggers ed.onClick.dispatch on TinyMCE |
java.lang.String |
getAttributeForSelector(java.lang.String selector,
java.lang.String attribute)
Returns the value of the given attribute for the given selector. |
TinyMce.Bookmark |
getBookmark()
|
ConfluenceSeleniumClient |
getClient()
|
java.lang.String |
getContent()
Returns the current content of the Editor as HTML. |
java.lang.String |
getCurrentSelectionText()
Returns the text of the current editor selection. |
java.lang.String |
getExpressionValue(java.lang.String expression)
Makes the TinyMCE doc available to the passed expression and evaluates it, returning the string result. |
java.lang.String |
getFirstMatchingNodeText(java.lang.String selector)
Retrieve the text of the first node that matches the given selector. |
java.lang.String |
getFullscreenFrameId()
|
static java.lang.String |
getLocatorForTags(java.lang.String tagNames,
com.atlassian.selenium.SeleniumClient.Browser browser)
Returns a selenium locator for the specified html tag in the TinyMCE editor. |
int |
getNumberOfCols()
|
int |
getNumberOfRows()
|
int |
getSelectorCount(java.lang.String selector)
|
java.lang.String |
getSelectorPresentScript(java.lang.String selector)
Returns a javascript function that checks for the presence of an element with given jquery selector in the TinyMCE editor. |
java.lang.String |
getSelectorScript(java.lang.String selector)
Returns a javascript function that checks for the presence of an element with given jquery selector in the TinyMCE editor. |
java.lang.String |
getToolbarButtonId(TinyMce.SimpleToolbarButton button)
|
void |
hideFullScreen()
Returns to the normal editor from fullscreen mode and resets the active frame. |
boolean |
isMacroPresent(java.lang.String macroName)
|
boolean |
isToolbarButtonEnabled(TinyMce.SimpleToolbarButton button)
|
EditorInsertMenu |
openInsertMenu()
|
void |
placeCursor(java.lang.String selector,
int position)
Positions the cursor at the specified position in the first matched element for the provided CSS selector. |
void |
placeCursorAtStart(boolean addingContent)
Places the cursor at the begining of the RTE. |
void |
placeCursorAtStart(java.lang.String selector)
Positions the cursor at the start of the first matched element for the provided CSS selector. |
void |
pressBackspace()
Types the "Backspace" key at the current cursor position. |
void |
pressDown()
Types the "Down arrow" key at the current cursor position. |
void |
pressEnter()
Types the "Enter" key at the current cursor position. |
void |
pressEscape()
Types the "Escape" key at the current cursor position. |
void |
pressShortcut(TinyMce.ShortCut shortCut)
|
void |
pressShortcut(TinyMce.SimpleToolbarButton button)
|
void |
pressUp()
Types the "Up arrow" key at the current cursor position. |
void |
putCursorAtStartOfFirstElementWithSelector(java.lang.String selector)
Place the cursor at the start of the first element matching the given selector. |
void |
scrollTopTo(int scrollTop)
Scroll the RTE vertically to a certain position. |
void |
selectEditorFrame()
Selects the TinyMCE iframe. |
void |
selectElementWithSelectorAndIndex(java.lang.String selector,
int elementIndex)
Select the nth element matching the given selector. |
void |
selectEmptyFirstParagraph()
|
void |
selectFirstElementWithSelector(java.lang.String selector)
Select the first element matching the given selector. |
void |
selectFirstParagraph()
|
void |
selectFormat(TinyMce.Format format)
|
void |
selectFullscreenFrame()
Selects the TinyMCE fullscreen iframe. |
void |
selectMacro(java.lang.String macroName)
|
void |
selectMainFrame()
Selects the main/top frame for Confluence. |
void |
selectTextColor(java.lang.String rgbColor)
|
void |
setContent(java.lang.String content)
|
void |
showFullScreen()
Clicks the fullscreen toolbar icon in the TinyMCE editor. |
EditorAutocomplete |
triggerAutocomplete(TinyMce.ShortCut shortCut)
Launches the autocomplete by pressing a shortcut key combination at the current cursor position. |
void |
type(java.lang.String content)
Only works for Firefox, and period doesn't work. |
void |
typeTextInFullScreen(java.lang.String content)
Types in the given content in fullscreen mode. |
void |
typeWithFullKeyEvents(java.lang.String content)
|
void |
waitForSelectorCount(java.lang.String selector,
int count)
|
void |
waitForSelectorPresent(java.lang.String selector)
Wait for the given jQuery selector to be present in the TinyMCE editor. |
void |
waitForTableCellPresent()
|
void |
waitForTableHeadingCellPresent()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TINYMCE_LOCATOR
Constructor Detail |
---|
public TinyMce(ConfluenceSeleniumClient client, Editor editor)
Method Detail |
---|
public ConfluenceSeleniumClient getClient()
public java.lang.String getFullscreenFrameId()
public static java.lang.String getLocatorForTags(java.lang.String tagNames, com.atlassian.selenium.SeleniumClient.Browser browser)
public void selectEditorFrame()
selectMainFrame()
to reselect the main outer frame.
public void selectFullscreenFrame()
selectMainFrame()
to reselect the main outer frame.
public void selectMainFrame()
public void showFullScreen()
hideFullScreen()
) in a finally block.
public void hideFullScreen()
public void typeTextInFullScreen(java.lang.String content)
public void selectFormat(TinyMce.Format format)
public void clickFormatMenuLink()
public java.lang.String getToolbarButtonId(TinyMce.SimpleToolbarButton button)
public boolean isToolbarButtonEnabled(TinyMce.SimpleToolbarButton button)
public void clickToolbarButton(TinyMce.SimpleToolbarButton button)
public void pressShortcut(TinyMce.SimpleToolbarButton button)
public void pressShortcut(TinyMce.ShortCut shortCut)
public void clickHorizontalRuler()
public InsertTablePopup clickInsertTable()
public void clickInsertRowBefore()
public void clickInsertRowAfter()
public void clickInsertColBefore()
public void clickInsertColAfter()
public EmoticonPickerPopup clickInsertEmoticon()
public InsertCharacterPopup clickInsertCharacter()
public void clickSelectedColor()
public void selectTextColor(java.lang.String rgbColor)
public ColorPickerPopup clickMoreColors()
public void waitForTableHeadingCellPresent()
public void waitForTableCellPresent()
public int getNumberOfRows()
public int getNumberOfCols()
public void setContent(java.lang.String content)
public java.lang.String getContent()
public void type(java.lang.String content)
public void typeWithFullKeyEvents(java.lang.String content)
SeleniumClient#typeWithFullKeyEvents}
public void selectFirstElementWithSelector(java.lang.String selector)
selector
- see tiny_mce_src.DOMUtils.selectpublic void selectElementWithSelectorAndIndex(java.lang.String selector, int elementIndex)
selector
- see tiny_mce_src.DOMUtils.selectelementIndex
- index of matched element to select, 0-indexedpublic java.lang.String getCurrentSelectionText()
public void putCursorAtStartOfFirstElementWithSelector(java.lang.String selector)
selector
- see tiny_mce_src.DOMUtils.selectpublic void placeCursorAtStart(boolean addingContent)
addingContent
- use true if adding content and there is nothing present in the editor.public void placeCursorAtStart(java.lang.String selector)
public void placeCursor(java.lang.String selector, int position)
public void selectEmptyFirstParagraph()
public void selectFirstParagraph()
public void selectMacro(java.lang.String macroName)
public boolean isMacroPresent(java.lang.String macroName)
public void pressBackspace()
public void pressEnter()
public void pressEscape()
public void pressDown()
public void pressUp()
public void dispatchClickEventForSelector(java.lang.String selector)
selector
- jQuery selector for element to click, should only select one elementpublic void dispatchDoubleClickEventForSelector(java.lang.String selector)
selector
- jQuery selector for element to click, should only select one elementpublic void waitForSelectorPresent(java.lang.String selector)
public java.lang.String getSelectorPresentScript(java.lang.String selector)
public int getSelectorCount(java.lang.String selector)
public java.lang.String getExpressionValue(java.lang.String expression)
expression
- a JavaScript expression, can assume "doc" is the TinyMCE document.
public void waitForSelectorCount(java.lang.String selector, int count)
public java.lang.String getAttributeForSelector(java.lang.String selector, java.lang.String attribute)
public java.lang.String getSelectorScript(java.lang.String selector)
public java.lang.String getFirstMatchingNodeText(java.lang.String selector)
public TinyMce.Bookmark getBookmark()
public EditorInsertMenu openInsertMenu()
public void scrollTopTo(int scrollTop)
public void clickOutsideEditor()
public EditorAutocomplete triggerAutocomplete(TinyMce.ShortCut shortCut)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |