com.atlassian.confluence.selenium.client
Class PageView

java.lang.Object
  extended by com.atlassian.confluence.selenium.client.PageView

public class PageView
extends Object

A helper for a Page or Blogpost view screen.


Constructor Summary
PageView(ConfluenceSeleniumClient client)
           
 
Method Summary
 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()
           
 int getCommentCount()
           
 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()
           
 String getTitle()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageView

public PageView(ConfluenceSeleniumClient client)
Method Detail

isCommentsShowing

public boolean isCommentsShowing()

getCommentCount

public int getCommentCount()

clickToggleComments

public void clickToggleComments()

typeTextComment

public void typeTextComment(String comment)
Type the given comment in the text comment editor.

Parameters:
comment - String comment to type

addTextComment

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

clickLoadCommentRte

public void clickLoadCommentRte(boolean waitForPageToLoad)
Clicks the rte comment link.

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

showVersionComment

public void showVersionComment()

hideVersionComment

public void hideVersionComment()

clickViewChange

public PageDiff clickViewChange()

clickPermissionsMetadataIcon

public PagePermissionsEditor clickPermissionsMetadataIcon()
Clicks the permissions "padlock" shown in the metadata area. This opens the Permissions dialog.


clickPermissionsMenuItem

public PagePermissionsEditor clickPermissionsMenuItem()
Clicks the "Permissions" menu item, opening the Permissions dialog.


openInfoPage

public PageInfo openInfoPage()
Clicks the "Permissions" menu item, opening the Permissions dialog.


openMovePageDialog

public MovePageDialog openMovePageDialog(ConfluenceSeleniumClient client)

isViewing

public boolean isViewing(LinkableContent linkableContent)
Returns true if the window is on the view screen for the passed Page.


isPageElementRightAligned

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.

manageWatchers

public ManageWatchersDialog manageWatchers()
Opens the Manage Watchers dialog on the current page and returns an object to interact with it.


getLabels

public List<String> getLabels()

clickShowComment

public void clickShowComment()

isShowCommentPresent

public boolean isShowCommentPresent()

getEvalOnContent

public String getEvalOnContent(String javascript)
Executes a javascript expression to return a value. There's a jquery variable "content", containing the content node.


getContent

public String getContent()

getNormalisedContent

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

getContentSelectorCount

public int getContentSelectorCount(String selector)
Counts the number of elements matching the selector in the content


clickOnEmbeddedImageLink

public void clickOnEmbeddedImageLink()
Clicks on an embedded image link and waits for the page to load


getImageCountWithClass

public int getImageCountWithClass(String className)
Returns the number of confluence-embedded-images with the specified class name.


getThumbnailImageCount

public int getThumbnailImageCount()

getNonThumbnailImageCount

public int getNonThumbnailImageCount()

clickBreadcrumbEllipsis

public void clickBreadcrumbEllipsis()

getTitle

public String getTitle()


Copyright © 2003-2013 Atlassian. All Rights Reserved.