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 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