|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.pageobjects.component.editor.EditorContent
public class EditorContent
| Field Summary | |
|---|---|
protected com.atlassian.pageobjects.PageBinder |
binder
|
protected org.openqa.selenium.JavascriptExecutor |
client
|
protected org.openqa.selenium.WebDriver |
driver
|
protected ConfluenceFrameExecutor |
execute
|
protected com.atlassian.pageobjects.elements.PageElementFinder |
page
|
protected com.atlassian.pageobjects.elements.timeout.Timeouts |
timeouts
|
| Constructor Summary | |
|---|---|
EditorContent()
|
|
| Method Summary | |
|---|---|
EditorAutocompleteMacro |
autocompleteMacro(java.lang.String content)
|
EditorContent |
clear()
|
MacroForm |
clickEditInlineMacro(java.lang.String macroName)
Click on the macro, than wait for the property panel to appear and click edit |
void |
clickInContent(org.openqa.selenium.By by)
|
MacroForm |
doubleClickEditInlineMacro(java.lang.String macroName)
Double click on the macro to trigger edit mode |
EditorContent |
focus()
|
java.lang.String |
getClassNameOfCurrentCursor()
|
com.atlassian.pageobjects.elements.query.TimedQuery<java.lang.String> |
getCurrentSearchMatchText()
|
java.lang.String |
getCurrentSelectionText()
Returns the text of the current editor selection. |
com.atlassian.pageobjects.elements.query.TimedQuery<java.lang.String> |
getCurrentSelectionTextTimed()
Returns a timed query for getting the current editor selection. |
java.lang.String |
getHtml()
Deprecated. Since 5.4 use getTimedHtml() |
RenderedContent |
getRenderedContent()
Returns a RenderedContent object which lets you easily access elements in the editor iframe without
having to manually switch frames. |
com.atlassian.pageobjects.elements.query.TimedQuery<java.lang.String> |
getTimedHtml()
|
com.atlassian.pageobjects.elements.query.TimedQuery<java.lang.Boolean> |
hasInlineMacro(java.lang.String macroName,
java.util.List<java.lang.String> macroParameters)
Check if inline macro is existed on editor panel or not |
com.atlassian.pageobjects.elements.query.TimedCondition |
hasLayout(PageLayout2Toolbar.PageLayoutSectionType sectionType)
|
com.atlassian.pageobjects.elements.query.TimedQuery<java.lang.Boolean> |
hasPageLinkWithExplicitSpaceKey(java.lang.String spaceKey,
java.lang.String pageTitle)
|
com.atlassian.pageobjects.elements.query.TimedQuery<java.lang.Boolean> |
isContentVisible()
|
com.atlassian.pageobjects.elements.query.TimedQuery<java.lang.Boolean> |
isElementPresentInEditorContentTimed(org.openqa.selenium.By selection)
Returns if certain selection is matched on the editor content |
com.atlassian.pageobjects.elements.query.TimedCondition |
isImagePresent(Attachment attachment)
|
com.atlassian.pageobjects.elements.query.TimedCondition |
isPresent(org.openqa.selenium.By by)
Check if the editor content has a certain element |
com.atlassian.pageobjects.elements.query.TimedCondition |
isVisble(org.openqa.selenium.By by)
Deprecated. since 5.5.1 use isPresent |
java.util.List<MacroPlaceholder> |
macroPlaceholderFor(java.lang.String macroName)
|
MentionsMenu |
mentionsAutocomplete(java.lang.String content)
|
void |
pasteContent(java.lang.String html)
Pastes the content as though it came from the clipboard. |
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 |
placeCursorAtEnd(java.lang.String selector)
Positions the cursor at the end of the first matched element for the provided CSS selector. |
void |
placeCursorAtStart(java.lang.String selector)
Positions the cursor at the start of the first matched element for the provided CSS selector. |
void |
putCursorAtEndOfFirstElementWithSelector(java.lang.String selector)
Place the cursor at the end of the first element matching the given selector. |
void |
putCursorAtStartOfElementWithSelectorAndIndex(java.lang.String selector,
int elementIndex)
Place the cursor at the start of the element matching the given selector and index. |
void |
putCursorAtStartOfFirstElementWithSelector(java.lang.String selector)
Place the cursor at the start of the first element matching the given selector. |
void |
redo()
Execute Redo command in editor |
void |
replaceCurrentSelectionChildContent(java.lang.String text)
|
void |
replaceCurrentSelectionChildContentWithHtml(java.lang.String html)
|
void |
replaceCurrentSelectionText(java.lang.String text)
Replaces the text of the current selection with the given text. |
void |
selectElementWithSelectorAndIndex(java.lang.String selector,
int elementIndex)
|
void |
selectFirstElementWithSelector(java.lang.String selector)
Select the first element matching the given selector. |
void |
selectFirstParagraph()
|
void |
sendKeys(java.lang.String keys)
|
EditorContent |
setContent(java.lang.String content)
|
void |
setContentInColumn(int column,
java.lang.String content)
|
void |
setContentViaJs(java.lang.String content)
This sets the content of the editor using the TinyMCE api. |
EditorContent |
type(java.lang.String content)
Type content in the editor. |
protected void |
typeIn(com.atlassian.pageobjects.elements.PageElement element,
java.lang.String content)
Currently uses sendKeys to the given element to type. |
void |
typeInColumn(int column,
java.lang.String content)
Type content in the given column index. |
EditorContent |
typeWithoutLosingFocus(java.lang.CharSequence... content)
Type content in the editor and do not lose focus |
void |
undo()
Execute Undo command in editor |
void |
waitForInlineMacro(java.lang.String macroName)
Wait for a macro without a body to be rendered. |
void |
waitForInlineMacroWithDefaultParameter(java.lang.String macroName,
java.lang.String defaultParameter)
Wait for a macro with a default parameter to be rendered. |
void |
waitForInlineMacroWithParameters(java.lang.String macroName,
java.lang.String parameters)
Wait for a macro with parameters to be rendered. |
void |
waitForMacroBody(java.lang.String macroName,
java.lang.String body)
Wait for a macro with a body to be rendered |
void |
waitForMacroBodyInColumn(int column,
java.lang.String macroName)
Wait for a macro with a body to be rendered inside a column |
void |
waitForTextContent(java.lang.String content)
Waits until the given text is present in the editor content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Inject protected ConfluenceFrameExecutor execute
@Inject protected com.atlassian.pageobjects.PageBinder binder
@Inject protected org.openqa.selenium.WebDriver driver
@Inject protected org.openqa.selenium.JavascriptExecutor client
@Inject protected com.atlassian.pageobjects.elements.PageElementFinder page
@Inject protected com.atlassian.pageobjects.elements.timeout.Timeouts timeouts
| Constructor Detail |
|---|
public EditorContent()
| Method Detail |
|---|
public RenderedContent getRenderedContent()
RenderedContent object which lets you easily access elements in the editor iframe without
having to manually switch frames.
public com.atlassian.pageobjects.elements.query.TimedQuery<java.lang.Boolean> isContentVisible()
public EditorContent setContent(java.lang.String content)
public void setContentViaJs(java.lang.String content)
content - html content to be set in the editorpublic EditorContent clear()
public EditorContent typeWithoutLosingFocus(java.lang.CharSequence... content)
public EditorContent focus()
public EditorContent type(java.lang.String content)
public void typeInColumn(int column,
java.lang.String content)
public void setContentInColumn(int column,
java.lang.String content)
public MacroForm clickEditInlineMacro(java.lang.String macroName)
macroName - The name of the macro to wait forpublic MacroForm doubleClickEditInlineMacro(java.lang.String macroName)
macroName - The name of the macro to wait forpublic void waitForInlineMacro(java.lang.String macroName)
macroName - The name of the macro to wait for
public void waitForInlineMacroWithDefaultParameter(java.lang.String macroName,
java.lang.String defaultParameter)
macroName - defaultParameter -
public void waitForInlineMacroWithParameters(java.lang.String macroName,
java.lang.String parameters)
macroName - parameters -
public void waitForMacroBodyInColumn(int column,
java.lang.String macroName)
column - The index of the column (1-based).macroName - The name of the macro to wait for
public void waitForMacroBody(java.lang.String macroName,
java.lang.String body)
macroName - body - public void waitForTextContent(java.lang.String content)
public void sendKeys(java.lang.String keys)
protected void typeIn(com.atlassian.pageobjects.elements.PageElement element,
java.lang.String content)
@Deprecated public java.lang.String getHtml()
public com.atlassian.pageobjects.elements.query.TimedQuery<java.lang.String> getTimedHtml()
public void selectFirstParagraph()
public void selectFirstElementWithSelector(java.lang.String selector)
public void selectElementWithSelectorAndIndex(java.lang.String selector,
int elementIndex)
public void placeCursorAtStart(java.lang.String selector)
public void placeCursorAtEnd(java.lang.String selector)
public void placeCursor(java.lang.String selector,
int position)
public void putCursorAtStartOfElementWithSelectorAndIndex(java.lang.String selector,
int elementIndex)
putCursorAtStartOfFirstElementWithSelector(String)
into it.
selector - see tiny_mce_src.DOMUtils.selectelementIndex - index of matched element to select, 0-indexedpublic void putCursorAtStartOfFirstElementWithSelector(java.lang.String selector)
selector - see tiny_mce_src.DOMUtils.selectpublic void putCursorAtEndOfFirstElementWithSelector(java.lang.String selector)
selector - see tiny_mce_src.DOMUtils.selectpublic java.lang.String getClassNameOfCurrentCursor()
public java.lang.String getCurrentSelectionText()
public com.atlassian.pageobjects.elements.query.TimedQuery<java.lang.String> getCurrentSelectionTextTimed()
public com.atlassian.pageobjects.elements.query.TimedQuery<java.lang.Boolean> isElementPresentInEditorContentTimed(org.openqa.selenium.By selection)
public void replaceCurrentSelectionText(java.lang.String text)
text - the text to replace the current selection withpublic void replaceCurrentSelectionChildContent(java.lang.String text)
public void replaceCurrentSelectionChildContentWithHtml(java.lang.String html)
public java.util.List<MacroPlaceholder> macroPlaceholderFor(java.lang.String macroName)
public com.atlassian.pageobjects.elements.query.TimedQuery<java.lang.String> getCurrentSearchMatchText()
public void clickInContent(org.openqa.selenium.By by)
@Deprecated public com.atlassian.pageobjects.elements.query.TimedCondition isVisble(org.openqa.selenium.By by)
public com.atlassian.pageobjects.elements.query.TimedCondition isPresent(org.openqa.selenium.By by)
public com.atlassian.pageobjects.elements.query.TimedCondition isImagePresent(Attachment attachment)
public com.atlassian.pageobjects.elements.query.TimedCondition hasLayout(PageLayout2Toolbar.PageLayoutSectionType sectionType)
public EditorAutocompleteMacro autocompleteMacro(java.lang.String content)
public MentionsMenu mentionsAutocomplete(java.lang.String content)
public com.atlassian.pageobjects.elements.query.TimedQuery<java.lang.Boolean> hasInlineMacro(java.lang.String macroName,
java.util.List<java.lang.String> macroParameters)
macroName - macroParameters -
public com.atlassian.pageobjects.elements.query.TimedQuery<java.lang.Boolean> hasPageLinkWithExplicitSpaceKey(java.lang.String spaceKey,
java.lang.String pageTitle)
public void undo()
public void redo()
public void pasteContent(java.lang.String html)
html -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||