com.atlassian.confluence.selenium.client
Class EditorPreview

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

public class EditorPreview
extends java.lang.Object

Provides test support for accessing the editor preview and its contents.


Constructor Summary
EditorPreview(ConfluenceSeleniumClient client, Suite confluence)
           
 
Method Summary
 java.lang.String executeJsFunctionOnSelector(java.lang.String selector, java.lang.String functionStr)
           
 java.lang.String getFirstMatchingPreviewNodeText(java.lang.String selector)
           
 java.lang.String getPreviewContent()
          Gets the html content in the preview.
 java.lang.String getPreviewSelectorScript(java.lang.String selector)
           
 java.lang.String getPreviewTableBodyCellText(int row, int column)
           
 java.lang.String getPreviewTableHeadingCellText(int row, int column)
           
 void waitForPreviewToContain(java.lang.String jquerySelector)
          Waits for the specified selector to match 1 or more items.
 void waitForPreviewToLoad()
          Waits up to Editor.EDITOR_TIMEOUT_MILLIS ms for the preview to load.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorPreview

public EditorPreview(ConfluenceSeleniumClient client,
                     Suite confluence)
Method Detail

waitForPreviewToContain

public void waitForPreviewToContain(java.lang.String jquerySelector)
Waits for the specified selector to match 1 or more items.

Parameters:
jquerySelector - the jquery selector to apply in the preview iframe.

getPreviewContent

public java.lang.String getPreviewContent()
Gets the html content in the preview.

Returns:
html

waitForPreviewToLoad

public void waitForPreviewToLoad()
Waits up to Editor.EDITOR_TIMEOUT_MILLIS ms for the preview to load.


getPreviewTableBodyCellText

public java.lang.String getPreviewTableBodyCellText(int row,
                                                    int column)

getPreviewTableHeadingCellText

public java.lang.String getPreviewTableHeadingCellText(int row,
                                                       int column)

getFirstMatchingPreviewNodeText

public java.lang.String getFirstMatchingPreviewNodeText(java.lang.String selector)

executeJsFunctionOnSelector

public java.lang.String executeJsFunctionOnSelector(java.lang.String selector,
                                                    java.lang.String functionStr)
Parameters:
selector - jQuery selector
functionStr - apply this function to the result of the selector

getPreviewSelectorScript

public java.lang.String getPreviewSelectorScript(java.lang.String selector)


Copyright © 2003-2013 Atlassian. All Rights Reserved.