Package com.xceptance.xlt.api.util
Class LightweightHtmlPageUtils
- java.lang.Object
-
- com.xceptance.xlt.api.util.BasicPageUtils
-
- com.xceptance.xlt.api.util.LightweightHtmlPageUtils
-
public class LightweightHtmlPageUtils extends BasicPageUtils
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 Constructor Description LightweightHtmlPageUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.String>
getAllAnchorLinks(java.lang.String page)
Returns the values of the "href" attribute of all "a" tags on the page as a list of strings.static java.util.List<java.lang.String>
getAllImageLinks(java.lang.String page)
Returns the values of the "src" attribute of all "img" tags on the page as a list of strings.static java.util.List<java.lang.String>
getAllLinkLinks(java.lang.String page)
Returns the values of the "href" attribute of all "link" tags on the page as a list of strings.static java.util.List<java.lang.String>
getAllScriptLinks(java.lang.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
-
-
-
-
Method Detail
-
getAllAnchorLinks
public static java.util.List<java.lang.String> getAllAnchorLinks(java.lang.String page)
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
public static java.util.List<java.lang.String> getAllImageLinks(java.lang.String page)
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
public static java.util.List<java.lang.String> getAllLinkLinks(java.lang.String page)
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
public static java.util.List<java.lang.String> getAllScriptLinks(java.lang.String page)
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
-
-