Class LogParserOutputPage
- java.lang.Object
-
- org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
-
- org.jenkinsci.test.acceptance.po.PageObject
-
- org.jenkinsci.test.acceptance.plugins.logparser.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LogParserOutputPage.LogParserFrame
Defines the different types of frames used by the parsed output of the logparser-
Nested classes/interfaces inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
CapybaraPortingLayerImpl.Finder<R>, CapybaraPortingLayerImpl.Resolver
-
-
Field Summary
-
Fields inherited from class org.jenkinsci.test.acceptance.po.PageObject
jsonParser, url
-
Fields inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
driver, injector, LABEL_TO_INPUT_XPATH, time
-
Fields inherited from interface org.jenkinsci.test.acceptance.po.CapybaraPortingLayer
by
-
-
Constructor Summary
Constructors Constructor Description LogParserOutputPage(PageObject po)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getColor(String category, int index)
Get the color of the text identified by logparser.String
getFragmentOfContentFrame(String category, int index)
Get the fragment part of the URL of the content frame after a link in the sidebar was clicked.List<org.openqa.selenium.WebElement>
getLinkList(String category)
Get a list of all links for one category.int
getNumberOfMatches(String category)
Get the number of matches identified by the logparser for one category.-
Methods inherited from class org.jenkinsci.test.acceptance.po.PageObject
control, control, createPageArea, createRandomName, getContext, getJenkins, open, toString, url, url, visit
-
Methods inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
all, blur, check, check, check, choose, clickButton, clickLink, confirmAlert, elasticSleep, executeScript, fillIn, find, findCaption, findCaption, findIfNotVisible, getCurrentUrl, getCurrentUrlWithFragment, getElement, getPageContent, getPageSource, getPageSource, getPath, handleAlert, isHiddenOrStale, isStale, last, lastIfNotVisible, newInstance, resource, runThenConfirmAlert, runThenConfirmAlert, runThenHandleAlert, runThenHandleAlert, runThenHandleDialog, sleep, visit, waitFor, waitFor, waitFor, waitFor, waitFor, waitForCond, waitForCond
-
-
-
-
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.
-
-