com.atlassian.confluence.selenium.client
Class EditorAutocomplete

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

public class EditorAutocomplete
extends Object

Represents an Autocomplete widget in the RTE that accepts keystrokes and displays a list of search results that a user may select from. TODO - this class copied from QuickNavBox, both should share methods.

See Also:
QuickNavBox, ContentNameSearchAction

Field Summary
static String DROPDOWN_ID
           
 
Method Summary
 void clickAdditionalLinkWithClass(String className)
           
 void clickInsertMedia()
           
 LinkBrowser clickInsertWebLink()
           
 void clickItem(String itemText)
           
 void clickResult(TitledContent contentEntity)
           
 void clickSearchFor()
           
 int getNumberOfResults()
          The number of results in the autocomplete dropdown not including the the headers and other menu options.
 String getResultTitle(String name)
           
 boolean hasImgForEntity(TitledContent contentEntity)
           
 boolean hasVisibleIconSpanForEntity(TitledContent contentEntity)
           
 boolean isPresent()
           
 boolean isVisibleAfterWait()
           
 void pressDown()
          Presses the down arrow key.
 void pressEnter()
          Presses the enter key.
 void pressUp()
          Presses the up arrow key.
 boolean resultsContain(TitledContent contentEntity)
          Returns true if the given ContentEntityObject appears in the dropdown menu.
static EditorAutocomplete triggerWithCharacter(String trigger, TinyMce tinyMce)
           
static EditorAutocomplete triggerWithShortcut(TinyMce.ShortCut shortCut, TinyMce tinyMce)
           
static EditorAutocomplete triggerWithShortcutWithoutWait(String trigger, TinyMce tinyMce)
           
 void type(String text)
           
 void waitForAdditionalLinkWithClassNotPresent(String className)
           
 void waitForAdditionalLinkWithClassPresent(String className)
           
 void waitForNthResultToContain(int index, String itemText)
           
 void waitForNumberOfResults(int expectedResults)
           
 void waitForResultsToContain(TitledContent contentEntity)
          Checks that the given ContentEntityObject appears in the dropdown menu.
 void waitForResultsToContainExactEntry(String name)
           
 void waitForResultsToPartiallyContain(String partialName)
           
 void waitForResultToBeSelected(int resultIndex)
           
 void waitUntilDead()
          Waits until there is no Autocomplete dropdown present in the DOM.
 void waitUntilQuickSearchNotBusy()
           
 void waitUntilVisible()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DROPDOWN_ID

public static final String DROPDOWN_ID
See Also:
Constant Field Values
Method Detail

triggerWithCharacter

public static EditorAutocomplete triggerWithCharacter(String trigger,
                                                      TinyMce tinyMce)

triggerWithShortcut

public static EditorAutocomplete triggerWithShortcut(TinyMce.ShortCut shortCut,
                                                     TinyMce tinyMce)

triggerWithShortcutWithoutWait

public static EditorAutocomplete triggerWithShortcutWithoutWait(String trigger,
                                                                TinyMce tinyMce)

type

public void type(String text)

isPresent

public boolean isPresent()

waitUntilVisible

public void waitUntilVisible()

isVisibleAfterWait

public boolean isVisibleAfterWait()

waitForNumberOfResults

public void waitForNumberOfResults(int expectedResults)

getNumberOfResults

public int getNumberOfResults()
The number of results in the autocomplete dropdown not including the the headers and other menu options.


waitForResultsToContainExactEntry

public void waitForResultsToContainExactEntry(String name)

waitForResultsToPartiallyContain

public void waitForResultsToPartiallyContain(String partialName)

getResultTitle

public String getResultTitle(String name)

waitForNthResultToContain

public void waitForNthResultToContain(int index,
                                      String itemText)

waitForAdditionalLinkWithClassPresent

public void waitForAdditionalLinkWithClassPresent(String className)

waitForAdditionalLinkWithClassNotPresent

public void waitForAdditionalLinkWithClassNotPresent(String className)

clickAdditionalLinkWithClass

public void clickAdditionalLinkWithClass(String className)

clickSearchFor

public void clickSearchFor()

clickInsertWebLink

public LinkBrowser clickInsertWebLink()

clickInsertMedia

public void clickInsertMedia()

pressDown

public void pressDown()
Presses the down arrow key.


pressUp

public void pressUp()
Presses the up arrow key.


pressEnter

public void pressEnter()
Presses the enter key.


clickResult

public void clickResult(TitledContent contentEntity)

clickItem

public void clickItem(String itemText)

waitUntilDead

public void waitUntilDead()
Waits until there is no Autocomplete dropdown present in the DOM.


waitForResultsToContain

public void waitForResultsToContain(TitledContent contentEntity)
Checks that the given ContentEntityObject appears in the dropdown menu.


resultsContain

public boolean resultsContain(TitledContent contentEntity)
Returns true if the given ContentEntityObject appears in the dropdown menu. Assumes that the dropdown is already displaying results.


hasImgForEntity

public boolean hasImgForEntity(TitledContent contentEntity)

hasVisibleIconSpanForEntity

public boolean hasVisibleIconSpanForEntity(TitledContent contentEntity)

waitUntilQuickSearchNotBusy

public void waitUntilQuickSearchNotBusy()

waitForResultToBeSelected

public void waitForResultToBeSelected(int resultIndex)


Copyright © 2003-2011 Atlassian. All Rights Reserved.