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

  Modifier and Type
  Method
  Description
  `static List<String>`
  `getAllAnchorLinks(String page)`
  Returns the values of the "href" attribute of all "a" tags on the page as a list of strings.
  `static List<String>`
  `getAllImageLinks(String page)`
  Returns the values of the "src" attribute of all "img" tags on the page as a list of strings.
  `static List<String>`
  `getAllLinkLinks(String page)`
  Returns the values of the "href" attribute of all "link" tags on the page as a list of strings.
  `static List<String>`
  `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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### LightweightHtmlPageUtils

    public LightweightHtmlPageUtils()

- ## Method Details

  - ### getAllAnchorLinks

    public static List<String> getAllAnchorLinks(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 List<String> getAllImageLinks(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 List<String> getAllLinkLinks(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 List<String> getAllScriptLinks(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