com.atlassian.confluence.selenium.client
Class EditorAutocomplete

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

public class EditorAutocomplete
extends java.lang.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 java.lang.String DROPDOWN_ID
           
 
Method Summary
 void clickAdditionalLinkWithClass(java.lang.String className)
           
 void clickInsertMedia()
           
 LinkBrowser clickInsertWebLink()
           
 void clickItem(java.lang.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.
 java.lang.String getResultTitle(java.lang.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(java.lang.String trigger, TinyMce tinyMce)
           
static EditorAutocomplete triggerWithShortcut(TinyMce.ShortCut shortCut, TinyMce tinyMce)
           
static EditorAutocomplete triggerWithShortcutWithoutWait(java.lang.String trigger, TinyMce tinyMce)
           
 void type(java.lang.String text)
           
 void waitForAdditionalLinkWithClassNotPresent(java.lang.String className)
           
 void waitForAdditionalLinkWithClassPresent(java.lang.String className)
           
 void waitForNthResultToContain(int index, java.lang.String itemText)
           
 void waitForNumberOfResults(int expectedResults)
           
 void waitForResultsToContain(TitledContent contentEntity)
          Checks that the given ContentEntityObject appears in the dropdown menu.
 void waitForResultsToContainExactEntry(java.lang.String name)
           
 void waitForResultsToPartiallyContain(java.lang.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 java.lang.String DROPDOWN_ID
See Also:
Constant Field Values
Method Detail

triggerWithCharacter

public static EditorAutocomplete triggerWithCharacter(java.lang.String trigger,
                                                      TinyMce tinyMce)

triggerWithShortcut

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

triggerWithShortcutWithoutWait

public static EditorAutocomplete triggerWithShortcutWithoutWait(java.lang.String trigger,
                                                                TinyMce tinyMce)

type

public void type(java.lang.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(java.lang.String name)

waitForResultsToPartiallyContain

public void waitForResultsToPartiallyContain(java.lang.String partialName)

getResultTitle

public java.lang.String getResultTitle(java.lang.String name)

waitForNthResultToContain

public void waitForNthResultToContain(int index,
                                      java.lang.String itemText)

waitForAdditionalLinkWithClassPresent

public void waitForAdditionalLinkWithClassPresent(java.lang.String className)

waitForAdditionalLinkWithClassNotPresent

public void waitForAdditionalLinkWithClassNotPresent(java.lang.String className)

clickAdditionalLinkWithClass

public void clickAdditionalLinkWithClass(java.lang.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(java.lang.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-2014 Atlassian. All Rights Reserved.