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
static String BROWSE_MACROS_TITLE
           
 
Fields inherited from class com.atlassian.confluence.selenium.client.Dialog
client, id
 
Constructor Summary
MacroBrowser(ConfluenceSeleniumClient client)
           
 
Method Summary
 void assertElementExistsInPreview(String jquerySelector)
           
 void clickBack()
           
 void clickCheckboxParam(String paramName, boolean check)
           
 void clickClose()
           
 void clickDropDownOption(String displayText)
          Click the specified option in the visible macro browser drop down
 void clickInsert()
           
 void clickPreview(boolean waitForPreview)
           
 void focusInSearch()
           
 String getBodyLabel()
          Returns the label for the Macro Body textarea.
 String getBodyText()
          Deprecated.  
static String getBrowseCategoryMacroId(MacroBrowser.Category category, String macroName)
           
 String getDropDownOptionTooltip(String displayText)
          Returns the tooltip (title) text for the dropdown option with the supplied display text.
 String getEditMacroTitle(String macroTitle)
           
 String getFreeformParams()
          Deprecated. Freeform macros are no longer supported
 String getInsertMacroTitle(String macroTitle)
           
 String getMacroDescription(String macroName)
           
 String getParameterDescription(String parameterName)
          Returns the description text under the given parameter for the currently-displayed macro.
 String getParamId(String paramName)
           
 String getParamValue(String paramName)
           
 String getSearch()
           
 MacroBrowser.Category getSelectedCategory()
           
 String[] getSelectOptions(String paramName)
           
 boolean hasCategory(MacroBrowser.Category category)
           
 boolean hasParameterField(String paramName)
          Returns true if there is a parameter field element present for the parameter with the supplied name.
 boolean isBodyTextAreaPresent()
          Deprecated.  
 boolean isCheckboxParamChecked(String paramName)
           
 boolean isDropDownOptionVisible(String displayText)
          Returns true if display text appears in the currently-visible 'smart field' drop down.
 boolean isDropDownVisibleForParameter(String paramName)
          Is a 'smart field' drop down visible for the named macro parameter.
 boolean isOkButtonEnabled()
           
 boolean isOnNoMetadataPage()
           
 boolean isOnSelectionPage()
           
 void search(String text)
           
 void selectCategory(MacroBrowser.Category category)
           
 void selectMacro(String macroKey)
           
 void selectMacro(String macroKey, boolean waitForPreview)
           
 void selectMainFrame()
          Selects the main/top frame for Confluence.
 void selectOption(String paramName, String value)
           
 void selectPreviewFrame()
           
 void typeBody(String text)
          Deprecated.  
 void typeFreeformMacro(String parameters)
          Deprecated. Freeform macros are no longer supported
 void typeStringParam(String paramName, String paramValue)
           
 void waitForDropDownForParameter(String paramName)
          Is a 'smart field' drop down visible for the named macro parameter.
 void waitForDropDownToCloseForParameter(String paramName)
          Waits until no dropdown is displayed for the named macro parameter.
 void waitForPreviewButtonToDisable()
          Wait for the preview button to be disabled
 void waitForPreviewButtonToEnable()
          Wait for the preview button to be enabled
 void waitForPreviewToLoad()
           
 
Methods inherited from class com.atlassian.confluence.selenium.client.Dialog
clickButton, clickCancel, clickLink, clickPageMenu, getId, getTitle, hasButton, hasLink, hasPageMenu, isButtonDisabled, isVisible, pressEscape, pressEscapeOnly, waitForRemoval, waitUntilHidden, waitUntilVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BROWSE_MACROS_TITLE

public static final String BROWSE_MACROS_TITLE
See Also:
Constant Field Values
Constructor Detail

MacroBrowser

public MacroBrowser(ConfluenceSeleniumClient client)
Method Detail

getMacroDescription

public String getMacroDescription(String macroName)

getInsertMacroTitle

public String getInsertMacroTitle(String macroTitle)

getEditMacroTitle

public String getEditMacroTitle(String macroTitle)

isOnNoMetadataPage

public boolean isOnNoMetadataPage()

isOnSelectionPage

public boolean isOnSelectionPage()

search

public void search(String text)

getSearch

public String getSearch()

focusInSearch

public void focusInSearch()

selectCategory

public void selectCategory(MacroBrowser.Category category)

hasCategory

public boolean hasCategory(MacroBrowser.Category category)

getSelectedCategory

public MacroBrowser.Category getSelectedCategory()

selectMacro

public void selectMacro(String macroKey)

selectMacro

public void selectMacro(String macroKey,
                        boolean waitForPreview)

waitForPreviewToLoad

public void waitForPreviewToLoad()

assertElementExistsInPreview

public void assertElementExistsInPreview(String jquerySelector)

selectPreviewFrame

public void selectPreviewFrame()

selectMainFrame

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


clickCheckboxParam

public void clickCheckboxParam(String paramName,
                               boolean check)

isCheckboxParamChecked

public boolean isCheckboxParamChecked(String paramName)

typeFreeformMacro

@Deprecated
public void typeFreeformMacro(String parameters)
Deprecated. Freeform macros are no longer supported


getFreeformParams

@Deprecated
public String getFreeformParams()
Deprecated. Freeform macros are no longer supported


hasParameterField

public boolean hasParameterField(String paramName)
Returns true if there is a parameter field element present for the parameter with the supplied name.


typeStringParam

public void typeStringParam(String paramName,
                            String paramValue)

getParamValue

public String getParamValue(String paramName)

typeBody

@Deprecated
public void typeBody(String text)
Deprecated. 


getBodyText

@Deprecated
public String getBodyText()
Deprecated. 


isBodyTextAreaPresent

@Deprecated
public boolean isBodyTextAreaPresent()
Deprecated. 


selectOption

public void selectOption(String paramName,
                         String value)

getSelectOptions

public String[] getSelectOptions(String paramName)

getBodyLabel

public String getBodyLabel()
Returns the label for the Macro Body textarea.


waitForDropDownForParameter

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


waitForDropDownToCloseForParameter

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


isDropDownVisibleForParameter

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


isDropDownOptionVisible

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


isOkButtonEnabled

public boolean isOkButtonEnabled()

getDropDownOptionTooltip

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


clickDropDownOption

public void clickDropDownOption(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)

waitForPreviewButtonToEnable

public void waitForPreviewButtonToEnable()
Wait for the preview button to be enabled


waitForPreviewButtonToDisable

public void waitForPreviewButtonToDisable()
Wait for the preview button to be disabled


clickClose

public void clickClose()

clickBack

public void clickBack()

clickInsert

public void clickInsert()

getParamId

public String getParamId(String paramName)
Returns:
the unique id for the named parameter on the macro browser

getParameterDescription

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


getBrowseCategoryMacroId

public static String getBrowseCategoryMacroId(MacroBrowser.Category category,
                                              String macroName)


Copyright © 2003-2012 Atlassian. All Rights Reserved.