Class LogParserOutputPage

  • All Implemented Interfaces:
    CapybaraPortingLayer

    public class LogParserOutputPage
    extends PageObject
    The logparser plugin uses two frames.

    To check the content of the frames the selenium driver must be switched to the frames.

    Author:
    Michael Engel.
    • Constructor Detail

      • LogParserOutputPage

        public LogParserOutputPage​(PageObject po)
        Constructor.
        Parameters:
        po - The page of the logparser.
    • Method Detail

      • getNumberOfMatches

        public int getNumberOfMatches​(String category)
                               throws Exception
        Get the number of matches identified by the logparser for one category.
        Parameters:
        category - The name of the category.
        Returns:
        The number of matches.
        Throws:
        Exception - Number not found or number not correctly extracted.
      • getLinkList

        public List<org.openqa.selenium.WebElement> getLinkList​(String category)
                                                         throws Exception
        Get a list of all links for one category.
        Parameters:
        category - The name of the category.
        Returns:
        The list elements belonging to this category.
        Throws:
        Exception - The list elements are not found.
      • getFragmentOfContentFrame

        public String getFragmentOfContentFrame​(String category,
                                                int index)
                                         throws Exception
        Get the fragment part of the URL of the content frame after a link in the sidebar was clicked.
        Parameters:
        category - The parser category of the link.
        index - The index of the link in the category, starting with 1.
        Returns:
        The fragment part of the URL.
        Throws:
        Exception - There is no such link.
      • getColor

        public String getColor​(String category,
                               int index)
                        throws Exception
        Get the color of the text identified by logparser.
        Parameters:
        category - The category of the logparser.
        index - The index of matches for this category, starting by 1.
        Returns:
        The color of the text.
        Throws:
        Exception - The text couldn't be found.