Class ChatWindow


public class ChatWindow
extends Window
Represents a window that contains all of the Chat Containers. There is only a single instance of ChatWindow per CommandCenter.
  • Field Details

  • Constructor Details

    • ChatWindow

      public ChatWindow​(UIContext context, org.openqa.selenium.WebElement element)
      ChatWindow. There will be only one ChatWindow per CommandCenter.
      Parameters:
      context -
      element -
  • Method Details

    • getChatPanel

      public TabPanel getChatPanel()
      Returns the Chat TabPanel which contains Notification and Chat panels.
      Returns:
      the Chat TabPanel which contains Notification and Chat panels.
    • getNavigationPanel

      public TabPanel getNavigationPanel()
      Returns the Navigation TabPanel which contains Friends and Find lists.
      Returns:
      the Navigation TabPanel which contains Friends and Find lists.
    • getSearchForFindList

      public TextField getSearchForFindList()
      Returns the Search textfield of the Find list.
      Returns:
      search textfield of the Find list.
    • getSearchForFriendsList

      public TextField getSearchForFriendsList()
      Returns the Search textfield of the Friends list.
      Returns:
      search textfield of the Friends list.
    • getActiveTabTitle

      public java.lang.String getActiveTabTitle()
      Returns the title of the ChatContainer's active tab.
      Returns:
      title of the ChatContainer's active tab.
    • getTabNotifierCounter

      public org.openqa.selenium.WebElement getTabNotifierCounter​(java.lang.String tabTitle)
      Finds the tab with the given title and returns it's notifier counter.
      Parameters:
      tabTitle -
      Returns:
      NotifierCounter of the tab or null iff it does not exist.
    • closeActiveTab

      public void closeActiveTab()
      Closes active tab of the ChatContainer TabPanel
    • getShowHistoryLink

      public org.openqa.selenium.WebElement getShowHistoryLink​(Container container)
      Returns clickable Show History link iff it exits.
      Parameters:
      container - - Notifications or individual Chat container
      Returns:
      show history link or null iff it does not exist.
    • getShowHistoryText

      public org.openqa.selenium.WebElement getShowHistoryText​(Container container)
      Returns the span element which replaces show history link with an informational message. Such as "No More Messages"
      Parameters:
      container - - Notifications or individual Chat container
      Returns:
      show history span text or null iff it does not exist.
    • getMessageBoxes

      public java.util.List<MessageBox> getMessageBoxes​(Container container, boolean includeHistory)
      Returns list of MessageBoxes within the container. If includeHistory is false, messages from previous sessions are ignored.
      Parameters:
      container -
      includeHistory - - set to false if history messages should not be returned
      Returns:
      List of MessageBoxes as WebElements
    • getMessageBoxCount

      public int getMessageBoxCount​(Container container, boolean includeHistory)
      Returns the total number of MessageBoxes within the container. If includeHistory is false, messages from previous sessions are ignored.
      Parameters:
      container -
      includeHistory - - set to false if history messages should not be returned
      Returns:
      total number of MessageBoxes
    • getMessageTypeField

      public TextAreaField getMessageTypeField​(Container container)
      Returns the text area to type messages into.
      Parameters:
      container - - open tab in the chat tabpanel
      Returns:
    • getListOfUsers

      public java.util.Map<java.lang.String,​java.lang.String> getListOfUsers()
      Returns list of Users(from Find list) with their status. Status can be one of the following: online offline request-for-me request-for-them blocked none
      Returns:
      Alphabetically Ordered Map of User's DisplayName -> status
    • getListOfFriends

      public java.util.Map<java.lang.String,​java.lang.String> getListOfFriends()
      Returns list of Friends with their status. Status can be one of the following: online offline request-for-me request-for-them blocked none
      Returns:
      Alphabetically Ordered Map of Friend's DisplayName -> status
    • getUserStatus

      public java.lang.String getUserStatus​(java.lang.String userDisplayName)
      Returns friend's status Status can be one of the following: online offline request-for-me request-for-them blocked none
      Parameters:
      userDisplayName -
      Returns:
      user's status or null if the user can not be found.
    • getFriendStatus

      public java.lang.String getFriendStatus​(java.lang.String friendDisplayName)
      Returns friend's status Status can be one of the following: online offline request-for-me request-for-them blocked none
      Parameters:
      friendDisplayName -
      Returns:
      friend's status or null if the friend can not be found.
    • getShowMoreLink

      public org.openqa.selenium.WebElement getShowMoreLink()
      Opens the Find tab and returns Show More link.
      Returns:
      "Show More" link as WebElement
    • clickOnAFriend

      public void clickOnAFriend​(java.lang.String friendDisplayName)
      Iff the friend exists, clicks on the Friend with the given display name. Iff the friend does not exist, skips.
      Parameters:
      friendDisplayName - - full display name of the user including enterprise name
    • rightClickOnAuser

      public void rightClickOnAuser​(java.lang.String userDisplayName)
      Right clicks on a user and opens context menu.
      Parameters:
      userDisplayName - - display name of the user
    • rightClickOnAFriend

      public void rightClickOnAFriend​(java.lang.String friendDisplayName)
      Right clicks on a friend and opens context menu.
      Parameters:
      friendDisplayName - - display name of the friend
    • clickOnContextMenuItem

      public void clickOnContextMenuItem​(java.lang.String itemName)
      Clicks on a context menu item. Make sure context menu is open before calling this method.
      Parameters:
      itemName - - name of the context menu item