public class

PageView

extends Object
java.lang.Object
   ↳ com.atlassian.confluence.selenium.client.PageView

Class Overview

A helper for a Page or Blogpost view screen.

Summary

Public Constructors
PageView(ConfluenceSeleniumClient client)
Public Methods
void addTextComment(String comment, boolean waitForPageToLoad)
Type the given comment in the text comment editor and click save.
void clickBreadcrumbEllipsis()
void clickLoadCommentRte(boolean waitForPageToLoad)
Clicks the rte comment link.
void clickOnEmbeddedImageLink()
Clicks on an embedded image link and waits for the page to load
PagePermissionsEditor clickPermissionsMenuItem()
Clicks the "Permissions" menu item, opening the Permissions dialog.
PagePermissionsEditor clickPermissionsMetadataIcon()
Clicks the permissions "padlock" shown in the metadata area.
void clickShowComment()
void clickToggleComments()
PageDiff clickViewChange()
String getContent()
int getContentSelectorCount(String selector)
Counts the number of elements matching the selector in the content
String getEvalOnContent(String javascript)
Executes a javascript expression to return a value.
int getImageCountWithClass(String className)
Returns the number of confluence-embedded-images with the specified class name.
List<String> getLabels()
int getNonThumbnailImageCount()
String getNormalisedContent()
Returns a version of getContent() that should be the same in all browsers.
int getThumbnailImageCount()
void hideVersionComment()
boolean isCommentsShowing()
boolean isPageElementRightAligned(String element, PageView page)
Checks if an element on a given page is right-aligned.
boolean isShowCommentPresent()
boolean isViewing(LinkableContent linkableContent)
Returns true if the window is on the view screen for the passed Page.
ManageWatchersDialog manageWatchers()
Opens the Manage Watchers dialog on the current page and returns an object to interact with it.
PageInfo openInfoPage()
Clicks the "Permissions" menu item, opening the Permissions dialog.
MovePageDialog openMovePageDialog(ConfluenceSeleniumClient client)
void showVersionComment()
void typeTextComment(String comment)
Type the given comment in the text comment editor.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PageView (ConfluenceSeleniumClient client)

Public Methods

public void addTextComment (String comment, boolean waitForPageToLoad)

Type the given comment in the text comment editor and click save.

Parameters
comment String comment to type
waitForPageToLoad whether to wait for the page to load after save

public void clickBreadcrumbEllipsis ()

public void clickLoadCommentRte (boolean waitForPageToLoad)

Clicks the rte comment link.

Parameters
waitForPageToLoad whether to wait for the page to load after clicking

public void clickOnEmbeddedImageLink ()

Clicks on an embedded image link and waits for the page to load

public PagePermissionsEditor clickPermissionsMenuItem ()

Clicks the "Permissions" menu item, opening the Permissions dialog.

public PagePermissionsEditor clickPermissionsMetadataIcon ()

Clicks the permissions "padlock" shown in the metadata area. This opens the Permissions dialog.

public void clickShowComment ()

public void clickToggleComments ()

public PageDiff clickViewChange ()

public String getContent ()

public int getContentSelectorCount (String selector)

Counts the number of elements matching the selector in the content

public String getEvalOnContent (String javascript)

Executes a javascript expression to return a value. There's a jquery variable "content", containing the content node.

public int getImageCountWithClass (String className)

Returns the number of confluence-embedded-images with the specified class name.

public List<String> getLabels ()

public int getNonThumbnailImageCount ()

public String getNormalisedContent ()

Returns a version of getContent() that should be the same in all browsers. The content is:

  • stripped of \r and \n
  • trimmed
  • converted to lowercase
  • /ul>

public int getThumbnailImageCount ()

public void hideVersionComment ()

public boolean isCommentsShowing ()

public boolean isPageElementRightAligned (String element, PageView page)

Checks if an element on a given page is right-aligned.

Parameters
element The DOM element to check alignment of.
page The page object
Returns
  • True if the text-align CSS property of the element is set to right.

public boolean isShowCommentPresent ()

public boolean isViewing (LinkableContent linkableContent)

Returns true if the window is on the view screen for the passed Page.

public ManageWatchersDialog manageWatchers ()

Opens the Manage Watchers dialog on the current page and returns an object to interact with it.

public PageInfo openInfoPage ()

Clicks the "Permissions" menu item, opening the Permissions dialog.

public MovePageDialog openMovePageDialog (ConfluenceSeleniumClient client)

public void showVersionComment ()

public void typeTextComment (String comment)

Type the given comment in the text comment editor.

Parameters
comment String comment to type