Package com.xceptance.xlt.api.util
Class LightweightHtmlPageUtils
java.lang.Object
com.xceptance.xlt.api.util.BasicPageUtils
com.xceptance.xlt.api.util.LightweightHtmlPageUtils
The LightweightHtmlPageUtils class provides some convenience methods for dealing with unparsed HTML pages, i.e. with
strings containing the page's HTML source.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllAnchorLinks
(String page) Returns the values of the "href" attribute of all "a" tags on the page as a list of strings.getAllImageLinks
(String page) Returns the values of the "src" attribute of all "img" tags on the page as a list of strings.getAllLinkLinks
(String page) Returns the values of the "href" attribute of all "link" tags on the page as a list of strings.getAllScriptLinks
(String page) Returns the values of the "src" attribute of all "script" tags on the page as a list of strings.Methods inherited from class com.xceptance.xlt.api.util.BasicPageUtils
getAbsoluteUrl, getAbsoluteUrl, pickOneRandomly, pickOneRandomly, pickOneRandomly
-
Constructor Details
-
LightweightHtmlPageUtils
public LightweightHtmlPageUtils()
-
-
Method Details
-
getAllAnchorLinks
Returns the values of the "href" attribute of all "a" tags on the page as a list of strings.- Parameters:
page
- the page source- Returns:
- the href attribute values
-
getAllImageLinks
Returns the values of the "src" attribute of all "img" tags on the page as a list of strings.- Parameters:
page
- the page source- Returns:
- the src attribute values
-
getAllLinkLinks
Returns the values of the "href" attribute of all "link" tags on the page as a list of strings.- Parameters:
page
- the page source- Returns:
- the href attribute values
-
getAllScriptLinks
Returns the values of the "src" attribute of all "script" tags on the page as a list of strings.- Parameters:
page
- the page source- Returns:
- the src attribute values
-