|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.meterware.httpunit.HttpUnitOptions
A collection of global options to control HttpUnit's behavior.
Field Summary | |
static java.lang.String |
DEFAULT_SCRIPT_ENGINE_FACTORY
|
static java.lang.String |
ORIGINAL_SCRIPTING_ENGINE_FACTORY
|
Constructor Summary | |
HttpUnitOptions()
|
Method Summary | |
static void |
addCustomAttribute(java.lang.String attributeName)
Deprecated. for new Scripting engine |
static void |
addHtmlErrorListener(HTMLParserListener el)
Deprecated. as of 1.5.2, use HTMLParserfactory#addHTMLParserListener |
static void |
clearScriptErrorMessages()
Clears the accumulated script error messages. |
static boolean |
getAutoRedirect()
Deprecated. as of 1.5.3, use ClientProperties#isAutoRedirect(); |
static boolean |
getAutoRefresh()
Deprecated. as of 1.5.3, use ClientProperties#isAutoRefresh(); |
static java.lang.String |
getDefaultCharacterSet()
Returns the character set to be used for pages which do not specify one. |
static java.lang.String |
getDefaultContentType()
Returns the content type to be used for pages which do not specify one. |
static boolean |
getExceptionsThrownOnErrorStatus()
Returns true if WebClient.getResponse throws exceptions when detected an error status. |
static boolean |
getExceptionsThrownOnScriptError()
Returns true if script errors cause exceptions to be thrown. |
static java.util.Vector |
getHtmlErrorListeners()
Deprecated. as of 1.5.2, removed with no replacement |
static boolean |
getImagesTreatedAsAltText()
Returns true if images are treated as text, using their alt attributes. |
static int |
getJavaScriptOptimizationLevel()
getter for Java Script optimization level |
static boolean |
getMatchesIgnoreCase()
If true, text matches in methods such as HTMLSegment.getLinkWith(java.lang.String) are
case insensitive. |
static boolean |
getParameterValuesValidated()
Deprecated. as of 1.6, use WebForm#newUnvalidatedRequest() to obtain a request without parameter validation. |
static boolean |
getParserWarningsEnabled()
Deprecated. as of 1.5.2, use HTMLParserFactory#isParserWarningsEnabled |
static int |
getRedirectDelay()
Returns the delay, in milliseconds, before a redirect request is issues. |
static java.lang.String |
getScriptEngineClassName()
|
static java.lang.String[] |
getScriptErrorMessages()
Returns the accumulated script error messages encountered. |
static ScriptingEngineFactory |
getScriptingEngine()
|
static boolean |
isAcceptCookies()
Deprecated. as of 1.5.3, use ClientProperties#isAcceptCookies(); |
static boolean |
isAcceptGzip()
Deprecated. as of 1.5.3, use ClientProperties#isAcceptGzip(); |
static boolean |
isCheckContentLength()
Returns true if HttpUnit will throw an exception when a message is only partially received. |
static boolean |
isLoggingHttpHeaders()
Returns true if HTTP headers are to be dumped to system output. |
static boolean |
isPostIncludesCharset()
Returns true if POST requests should include the character set in the content-type header. |
static boolean |
isScriptingEnabled()
|
static void |
removeHtmlErrorListener(HTMLParserListener el)
Deprecated. as of 1.5.2, use HTMLParserfactory#removeHTMLParserListener |
static void |
reset()
Resets all options to their default values. |
static void |
resetDefaultCharacterSet()
Resets the default character set to the HTTP default encoding. |
static void |
resetDefaultContentType()
Resets the default content type to plain text. |
static void |
setAcceptCookies(boolean acceptCookies)
Deprecated. as of 1.5.3, use ClientProperties#setAcceptCookies(); |
static void |
setAcceptGzip(boolean acceptGzip)
Deprecated. as of 1.5.3, use ClientProperties#setAcceptGzip(); |
static void |
setAutoRedirect(boolean autoRedirect)
Deprecated. as of 1.5.3, use ClientProperties#setAutoRedirect(); |
static void |
setAutoRefresh(boolean autoRefresh)
Deprecated. as of 1.5.3, use ClientProperties#setAutoRefresh(); |
static void |
setCheckContentLength(boolean checkContentLength)
Specifies whether HttpUnit should throw an exception when the content length of a message does not match its actual received length. |
static void |
setDefaultCharacterSet(java.lang.String characterSet)
Sets the default character set for pages which do not specify one and for requests created without HTML sources. |
static void |
setDefaultContentType(java.lang.String contentType)
Sets the default content type for pages which do not specify one. |
static void |
setExceptionsThrownOnErrorStatus(boolean enabled)
If true, WebClient.getResponse throws an exception when it receives an error status. |
static void |
setExceptionsThrownOnScriptError(boolean throwExceptions)
Determines whether script errors result in exceptions or warning messages. |
static void |
setImagesTreatedAsAltText(boolean asText)
If true, tells HttpUnit to treat images with alt attributes as though they were the text value of that attribute in all searches and displays. |
static void |
setJavaScriptOptimizationLevel(int scriptOptimizationLevel)
setter for Java Script optimization level |
static void |
setLoggingHttpHeaders(boolean enabled)
If true, tells HttpUnit to log HTTP headers to system output. |
static void |
setMatchesIgnoreCase(boolean ignoreCase)
If true, text matches in methods such as HTMLSegment.getLinkWith(java.lang.String) are
case insensitive. |
static void |
setParameterValuesValidated(boolean validated)
Deprecated. as of 1.6, use WebForm#newUnvalidatedRequest() to obtain a request without parameter validation. |
static void |
setParserWarningsEnabled(boolean enabled)
Deprecated. as of 1.5.2, use HTMLParserFactory#setParserWarningsEnabled |
static void |
setPostIncludesCharset(boolean postIncludesCharset)
Determines whether a normal POST request will include the character set in the content-type header. |
static void |
setRedirectDelay(int delayInMilliseconds)
Sets the delay, in milliseconds, before a redirect request is issued. |
static void |
setScriptEngineClassName(java.lang.String scriptEngineClassName)
|
static void |
setScriptingEnabled(boolean scriptingEnabled)
change the scriptingEnabled flag |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String ORIGINAL_SCRIPTING_ENGINE_FACTORY
public static final java.lang.String DEFAULT_SCRIPT_ENGINE_FACTORY
Constructor Detail |
public HttpUnitOptions()
Method Detail |
public static void reset()
public static boolean isAcceptCookies()
public static void setAcceptCookies(boolean acceptCookies)
public static boolean isAcceptGzip()
public static void setAcceptGzip(boolean acceptGzip)
public static void resetDefaultCharacterSet()
public static void resetDefaultContentType()
public static void setDefaultCharacterSet(java.lang.String characterSet)
public static java.lang.String getDefaultCharacterSet()
public static boolean isCheckContentLength()
public static void setCheckContentLength(boolean checkContentLength)
public static void setPostIncludesCharset(boolean postIncludesCharset)
public static boolean isPostIncludesCharset()
public static void setDefaultContentType(java.lang.String contentType)
public static java.lang.String getDefaultContentType()
public static boolean getParserWarningsEnabled()
public static void setParserWarningsEnabled(boolean enabled)
public static void setExceptionsThrownOnErrorStatus(boolean enabled)
public static boolean getExceptionsThrownOnErrorStatus()
public static boolean getParameterValuesValidated()
public static void setParameterValuesValidated(boolean validated)
public static boolean getImagesTreatedAsAltText()
public static void setImagesTreatedAsAltText(boolean asText)
public static boolean getMatchesIgnoreCase()
HTMLSegment.getLinkWith(java.lang.String)
are
case insensitive. The default is true (matches ignore case).
public static void setMatchesIgnoreCase(boolean ignoreCase)
HTMLSegment.getLinkWith(java.lang.String)
are
case insensitive. The default is true (matches ignore case).
public static boolean isLoggingHttpHeaders()
public static void setLoggingHttpHeaders(boolean enabled)
public static boolean getAutoRedirect()
public static void setAutoRedirect(boolean autoRedirect)
public static int getRedirectDelay()
public static void setRedirectDelay(int delayInMilliseconds)
public static boolean getAutoRefresh()
public static void setAutoRefresh(boolean autoRefresh)
public static void removeHtmlErrorListener(HTMLParserListener el)
public static void addHtmlErrorListener(HTMLParserListener el)
public static java.util.Vector getHtmlErrorListeners()
public static java.lang.String getScriptEngineClassName()
public static void setScriptEngineClassName(java.lang.String scriptEngineClassName)
public static ScriptingEngineFactory getScriptingEngine()
public static void setScriptingEnabled(boolean scriptingEnabled)
scriptingEnabled
- public static boolean isScriptingEnabled()
public static void setExceptionsThrownOnScriptError(boolean throwExceptions)
public static boolean getExceptionsThrownOnScriptError()
public static java.lang.String[] getScriptErrorMessages()
public static void clearScriptErrorMessages()
public static void addCustomAttribute(java.lang.String attributeName)
public static int getJavaScriptOptimizationLevel()
public static void setJavaScriptOptimizationLevel(int scriptOptimizationLevel)
scriptOptimizationLevel
- the _javaScriptOptimizationLevel to set
see rhino documentation for valid values:
-2: with continuation
-1: interpret
0: compile to Java bytecode, don't optimize
1..9: compile to Java bytecode, optimize *
|
Copyright © 2000-2008 Russell Gold. See license agreement for rights granted. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |