com.atlassian.confluence.selenium.client
Class EditorPreview

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

public class EditorPreview
extends Object

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


Constructor Summary
EditorPreview(ConfluenceSeleniumClient client, Suite confluence)
           
 
Method Summary
 String executeJsFunctionOnSelector(String selector, String functionStr)
           
 String getFirstMatchingPreviewNodeText(String selector)
           
 String getPreviewContent()
          Gets the html content in the preview.
 String getPreviewSelectorScript(String selector)
           
 String getPreviewTableCellText(int row, int column)
           
 void waitForPreviewToContain(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(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 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.


getPreviewTableCellText

public String getPreviewTableCellText(int row,
                                      int column)

getFirstMatchingPreviewNodeText

public String getFirstMatchingPreviewNodeText(String selector)

executeJsFunctionOnSelector

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

getPreviewSelectorScript

public String getPreviewSelectorScript(String selector)


Copyright © 2003-2012 Atlassian. All Rights Reserved.