Class CommentsTab


  • public class CommentsTab
    extends BaseElement
    Page Object for Comments Tab (or pane).
    Since:
    3.2M3
    Version:
    $Id: f3a445bae04cd2ecd535731594be9e98665e6eae $
    • Constructor Detail

      • CommentsTab

        public CommentsTab()
    • Method Detail

      • isOpened

        public boolean isOpened()
      • getCurrentAuthor

        public String getCurrentAuthor()
      • isCommentFormShown

        public boolean isCommentFormShown()
      • openCommentForm

        public void openCommentForm()
        Opens the comment form by clicking on the comment button. If the comment button has already been clicked, does nothing.
      • setAnonymousCommentAuthor

        public void setAnonymousCommentAuthor​(String author)
      • getCommentID

        public int getCommentID​(String content)
      • getAddCommentForm

        public CommentForm getAddCommentForm()
        Returns:
        the form used to add a new comment
      • postComment

        public int postComment​(String content,
                               boolean wait)
      • postCommentAsGuest

        public int postCommentAsGuest​(String content,
                                      String author,
                                      boolean wait)
      • deleteCommentByID

        public void deleteCommentByID​(int id)
        Deletes a comment.
        Parameters:
        id - the comment id
      • replyToCommentByID

        public CommentForm replyToCommentByID​(int id)
        Clicks on the reply icon near the specified comment.
        Parameters:
        id - identifies the comment to reply to
        Returns:
        the form used to reply
      • replyToCommentByID

        public void replyToCommentByID​(int id,
                                       String replyContent)
        Replies to a comment with the specified content.
        Parameters:
        id - the comment id
        replyContent - the comment content of the reply
      • editCommentByID

        public CommentForm editCommentByID​(int id)
        Clicks on the edit icon near the specified comment.
        Parameters:
        id - identifies the comment to be edited
        Returns:
        the form used to edit the comment
      • editCommentByID

        public void editCommentByID​(int id,
                                    String content)
        Edits a comment with the specified content.
        Parameters:
        id - the comment id
        content - the new comment content
      • getCommentAuthorByID

        public String getCommentAuthorByID​(int id)
        Parameters:
        id - the comment id
        Returns:
        the comment author
      • getCommentContentByID

        public String getCommentContentByID​(int id)
        Parameters:
        id - the comment id
        Returns:
        the comment content
      • hasEditButtonForCommentByID

        public boolean hasEditButtonForCommentByID​(int id)
        Parameters:
        id - the comment id
        Returns:
        true if the comment has the edit button
        Since:
        3.2M3
      • hasDeleteButtonForCommentByID

        public boolean hasDeleteButtonForCommentByID​(int id)
        Parameters:
        id - the comment id
        Returns:
        true if the comment has the delete button
        Since:
        10.6RC1, 9.11.9
      • cancelCommentForm

        public void cancelCommentForm()
        Cancel the currently open comment form (new comment, edit or reply) by clicking on the cancel button.
        Since:
        14.1RC1, 13.10.3
      • clickOnReplyToCommentByID

        public void clickOnReplyToCommentByID​(int id)
        Click on the reply button of a comment. The comment to reply to is found by its id.
        Parameters:
        id - the id of the comment to reply to
        Since:
        14.1RC1, 13.10.3