createEmptyDoc
public static Document createEmptyDoc()
createURLFromForm
public static List createURLFromForm(Node doc,
URL context)
createUrlFromAnchor
public static HTTPSamplerBase createUrlFromAnchor(String parsedUrlString,
URL context)
throws MalformedURLException
Create a new Sampler based on an HREF string plus a contextual URL
object. Given that an HREF string might be of three possible forms, some
processing is required.
extractStyleURLs
public static void extractStyleURLs(URL baseUrl,
URLCollection urls,
String styleTagStr)
getDOM
public static Node getDOM(String text)
Returns a node representing a whole xml given an xml document.
- a node representing a whole xml
getParser
public static Tidy getParser()
Returns tidy
as HTML parser.
isAnchorMatched
public static boolean isAnchorMatched(HTTPSamplerBase newLink,
HTTPSamplerBase config)
Check if anchor matches by checking against:
- protocol
- domain
- path
- parameter names
newLink
- target to matchconfig
- pattern to match against
- true if target URL matches pattern URL
isArgumentMatched
public static boolean isArgumentMatched(Argument arg,
Argument patternArg)
Arguments match if the input name matches the corresponding pattern name
and the input value matches the pattern value, where the matching is done
first using String equals, and then Regular Expression matching if the equals test fails.
arg
- - input ArgumentpatternArg
- - pattern to match against
- true if both name and value match
isEqualOrMatches
public static boolean isEqualOrMatches(String arg,
String pat)
Match the input argument against the pattern using String.equals() or pattern matching if that fails
using case-insensitive matching.
arg
- input stringpat
- pattern string
- true if input matches the pattern
isEqualOrMatches
public static boolean isEqualOrMatches(String arg,
String pat,
Perl5Matcher matcher,
PatternCacheLRU cache)
Match the input argument against the pattern using String.equals() or pattern matching if that fails.
arg
- input stringpat
- pattern stringmatcher
- Perl5Matchercache
- PatternCache
- true if input matches the pattern
isEqualOrMatchesCaseBlind
public static boolean isEqualOrMatchesCaseBlind(String arg,
String pat)
Match the input argument against the pattern using String.equals() or pattern matching if that fails
using case-insensitive matching.
arg
- input stringpat
- pattern string
- true if input matches the pattern
isEqualOrMatchesCaseBlind
public static boolean isEqualOrMatchesCaseBlind(String arg,
String pat,
Perl5Matcher matcher,
PatternCacheLRU cache)
Match the input argument against the pattern using String.equals() or pattern matching if that fails
using case-insenssitive matching.
arg
- input stringpat
- pattern stringmatcher
- Perl5Matchercache
- PatternCache
- true if input matches the pattern