public class Editor extends Object
Modifier and Type | Field and Description |
---|---|
static int |
EDITOR_TIMEOUT_MILLIS |
Constructor and Description |
---|
Editor(ConfluenceSeleniumClient client,
Suite suite) |
Modifier and Type | Method and Description |
---|---|
void |
addComment(Page page) |
PageView |
cancel() |
void |
createBlogPost(Space space) |
void |
createPage(Space space) |
TinyMce |
edit(ContentEntity contentEntity) |
long |
getAttachmentSourceContentId() |
String |
getContent() |
long |
getContentId() |
String |
getHtmlSourceContent() |
Location |
getLocation() |
MacroBrowser |
getMacroBrowser()
For use when opening the macro browser manually, e.g.
|
Map<String,String> |
getMacroParameters(String name)
Retrieve a macro's parameters from the editor.
|
TinyMce |
getTinyMce() |
String |
getTitle()
Gets the value in the editor Title field.
|
long |
getToolbarPositionTop() |
InsertImageDialog |
insertImage()
Opens the image dialog if in RTE mode.
|
void |
insertImage(Attachment attachment) |
TinyMce |
logInAndAddComment(User user,
BlogPost blogpost) |
TinyMce |
logInAndAddComment(User user,
Page page) |
TinyMce |
logInAndCreateBlogPost(User user,
Space space) |
TinyMce |
logInAndCreatePage(User user,
Space space) |
TinyMce |
logInAndEdit(User user,
ContentEntity contentEntity) |
TinyMce |
logInAndEditInRTE(User user,
ContentEntity contentEntity)
Logs the given user in, edits the given content and switches to the RTE.
|
void |
merge()
Click the link to merge an existing draft with the current editor content.
|
LinkBrowser |
openLinkBrowser() |
MacroBrowser |
openMacroBrowser() |
PagePermissionsEditor |
openPermissionsEditor() |
PageView |
save() |
PageView |
saveWithKeyboardShortcut() |
MovePageDialog |
saveWithLocation()
Note that this is only available as a dark feature now.
|
void |
selectFirstParagraph() |
void |
setContent(String content)
Note: Be careful with \n characters as they behave differently in IE and FF at the moment.
|
void |
setHtmlContent(String htmlContent) |
void |
setTitle(String title) |
EditorPreview |
switchToPreview() |
void |
triggerDraftAndCheckUserDrafts() |
void |
triggerDraftAndCheckUserDrafts(Page page)
Triggers a draft to be saved and then checks that the draft screen contains a draft with the title
of the given page.
|
void |
triggerDraftAndEdit(Page page)
Triggers a draft to be saved.
|
void |
triggerDraftAutoSave()
Triggers a draft by switching to preview mode.
|
void |
waitForDraftAutoSavedMessage() |
void |
waitForEditorPageLoad()
Waits for the page to load with the configured editor page load timeout.
|
void |
waitForPreviewToLoad()
Wait until the preview is loaded
|
void |
waitUntilEditorIsVisible()
Wait until the RTE is visible after switching back from the preview
|
public Editor(ConfluenceSeleniumClient client, Suite suite)
public void waitForEditorPageLoad()
public TinyMce logInAndEdit(User user, ContentEntity contentEntity)
public TinyMce logInAndEditInRTE(User user, ContentEntity contentEntity)
public TinyMce edit(ContentEntity contentEntity)
public void addComment(Page page)
public void createPage(Space space)
public void createBlogPost(Space space)
public String getHtmlSourceContent()
public String getTitle()
public void setHtmlContent(String htmlContent)
public void setContent(String content)
public String getContent()
public void selectFirstParagraph()
public EditorPreview switchToPreview()
public void triggerDraftAutoSave()
public void waitForDraftAutoSavedMessage()
public void triggerDraftAndCheckUserDrafts(Page page)
public void triggerDraftAndCheckUserDrafts()
public void triggerDraftAndEdit(Page page)
public PageView save()
public PageView saveWithKeyboardShortcut()
public PageView cancel()
public PagePermissionsEditor openPermissionsEditor()
public void setTitle(String title)
public void merge()
public TinyMce getTinyMce()
public MovePageDialog saveWithLocation()
public MacroBrowser openMacroBrowser()
public LinkBrowser openLinkBrowser()
public MacroBrowser getMacroBrowser()
public void waitForPreviewToLoad()
public void waitUntilEditorIsVisible()
public InsertImageDialog insertImage()
public void insertImage(Attachment attachment)
public long getContentId()
public long getAttachmentSourceContentId()
public Location getLocation()
public long getToolbarPositionTop()
public Map<String,String> getMacroParameters(String name)
name
- the name of the macro to be checked forcom.thoughtworks.selenium.SeleniumException
- if the macro doesn't exist.Copyright © 2003–2017 Atlassian. All rights reserved.