com.atlassian.confluence.selenium.client
Class MacroBrowser

java.lang.Object
  extended by com.atlassian.confluence.selenium.client.Dialog
      extended by com.atlassian.confluence.selenium.client.MacroBrowser

public class MacroBrowser
extends Dialog


Nested Class Summary
static class MacroBrowser.Category
           
 
Field Summary
 
Fields inherited from class com.atlassian.confluence.selenium.client.Dialog
client, id
 
Constructor Summary
MacroBrowser(ConfluenceSeleniumClient client, Editor editor)
           
 
Method Summary
 void clickBack()
           
 void clickCheckboxParam(java.lang.String paramName, boolean check)
           
 void clickClose()
           
 void clickDropDownOption(java.lang.String displayText)
          Click the specified option in the visible macro browser drop down
 void clickInsert()
           
 void clickPreview(boolean waitForPreview)
           
 java.lang.String getBodyText()
           
 java.lang.String getDropDownOptionTooltip(java.lang.String displayText)
          Returns the tooltip (title) text for the dropdown option with the supplied display text.
 java.lang.String getEditMacroTitle(java.lang.String macroTitle)
           
 java.lang.String getFreeformParams()
           
 java.lang.String getInsertMacroTitle(java.lang.String macroTitle)
           
 java.lang.String getMacroDescription(java.lang.String macroName)
           
 java.lang.String getParameterDescription(java.lang.String parameterName)
          Returns the description text under the given parameter for the currently-displayed macro.
 java.lang.String getParamId(java.lang.String paramName)
           
 java.lang.String getParamValue(java.lang.String paramName)
           
 java.lang.String getSearch()
           
 boolean isBodyTextAreaPresent()
           
 boolean isCheckboxParamChecked(java.lang.String paramName)
           
 boolean isDropDownOptionVisible(java.lang.String displayText)
          Returns true if display text appears in the currently-visible 'smart field' drop down.
 boolean isDropDownVisibleForParameter(java.lang.String paramName)
          Is a 'smart field' drop down visible for the named macro parameter.
 boolean isOnSelectionPage()
           
 void search(java.lang.String text)
           
 void selectCategory(MacroBrowser.Category category)
           
 void selectMacro(java.lang.String macroKey)
           
 void selectMacro(java.lang.String macroKey, boolean waitForPreview)
           
 void selectMainFrame()
          Selects the main/top frame for Confluence.
 void selectPreviewFrame()
           
 void typeBody(java.lang.String text)
           
 void typeFreeformMacro(java.lang.String parameters)
           
 void typeStringParam(java.lang.String paramName, java.lang.String paramValue)
           
 void waitForDropDownForParameter(java.lang.String paramName)
          Is a 'smart field' drop down visible for the named macro parameter.
 void waitForDropDownToCloseForParameter(java.lang.String paramName)
          Waits until no dropdown is displayed for the named macro parameter.
 void waitForPreviewToLoad()
           
 
Methods inherited from class com.atlassian.confluence.selenium.client.Dialog
clickButton, clickPageMenu, getId, getTitle, hasButton, isButtonDisabled, isVisible, pressEscape, waitUntilHidden, waitUntilVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MacroBrowser

public MacroBrowser(ConfluenceSeleniumClient client,
                    Editor editor)
Method Detail

getMacroDescription

public java.lang.String getMacroDescription(java.lang.String macroName)

getInsertMacroTitle

public java.lang.String getInsertMacroTitle(java.lang.String macroTitle)

getEditMacroTitle

public java.lang.String getEditMacroTitle(java.lang.String macroTitle)

isOnSelectionPage

public boolean isOnSelectionPage()

search

public void search(java.lang.String text)

getSearch

public java.lang.String getSearch()

selectCategory

public void selectCategory(MacroBrowser.Category category)

selectMacro

public void selectMacro(java.lang.String macroKey)

selectMacro

public void selectMacro(java.lang.String macroKey,
                        boolean waitForPreview)

waitForPreviewToLoad

public void waitForPreviewToLoad()

selectPreviewFrame

public void selectPreviewFrame()

selectMainFrame

public void selectMainFrame()
Selects the main/top frame for Confluence.


clickCheckboxParam

public void clickCheckboxParam(java.lang.String paramName,
                               boolean check)

isCheckboxParamChecked

public boolean isCheckboxParamChecked(java.lang.String paramName)

typeFreeformMacro

public void typeFreeformMacro(java.lang.String parameters)

getFreeformParams

public java.lang.String getFreeformParams()

typeStringParam

public void typeStringParam(java.lang.String paramName,
                            java.lang.String paramValue)

getParamValue

public java.lang.String getParamValue(java.lang.String paramName)

typeBody

public void typeBody(java.lang.String text)

getBodyText

public java.lang.String getBodyText()

isBodyTextAreaPresent

public boolean isBodyTextAreaPresent()

waitForDropDownForParameter

public void waitForDropDownForParameter(java.lang.String paramName)
Is a 'smart field' drop down visible for the named macro parameter.

Parameters:
paramName -

waitForDropDownToCloseForParameter

public void waitForDropDownToCloseForParameter(java.lang.String paramName)
Waits until no dropdown is displayed for the named macro parameter.


isDropDownVisibleForParameter

public boolean isDropDownVisibleForParameter(java.lang.String paramName)
Is a 'smart field' drop down visible for the named macro parameter.

Parameters:
paramName -

isDropDownOptionVisible

public boolean isDropDownOptionVisible(java.lang.String displayText)
Returns true if display text appears in the currently-visible 'smart field' drop down.

Parameters:
displayText -

getDropDownOptionTooltip

public java.lang.String getDropDownOptionTooltip(java.lang.String displayText)
Returns the tooltip (title) text for the dropdown option with the supplied display text.


clickDropDownOption

public void clickDropDownOption(java.lang.String displayText)
Click the specified option in the visible macro browser drop down

Parameters:
displayText - the display text of the option to be selected

clickPreview

public void clickPreview(boolean waitForPreview)

clickClose

public void clickClose()

clickBack

public void clickBack()

clickInsert

public void clickInsert()

getParamId

public java.lang.String getParamId(java.lang.String paramName)
Parameters:
paramName -
Returns:
the unique id for the named parameter on the macro browser

getParameterDescription

public java.lang.String getParameterDescription(java.lang.String parameterName)
Returns the description text under the given parameter for the currently-displayed macro.



Copyright © 2003-2010 Atlassian. All Rights Reserved.