|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.htmlunit.HtmlUnitDialog com.atlassian.confluence.htmlunit.ConfluenceHtmlUnitDialog
public class ConfluenceHtmlUnitDialog
This class is a copy of HtmlUnitDialog
with modifications to the
initWebClient()
method to allow setting configuration from properties file.
Field Summary | |
---|---|
static com.gargoylesoftware.htmlunit.Cache |
newCache
|
Fields inherited from class com.atlassian.confluence.htmlunit.HtmlUnitDialog |
---|
expectedJavascriptAlerts, expectedJavascriptConfirms, expectedJavascriptPrompts, form, jsEnabled, wc, win |
Constructor Summary | |
---|---|
ConfluenceHtmlUnitDialog()
|
Method Summary | |
---|---|
protected com.gargoylesoftware.htmlunit.html.ClickableElement |
getButton(String buttonId)
Overridden to use the correct window in the case of pop-ups. |
com.atlassian.util.concurrent.Supplier<JSoupTester> |
getJSoupSupplier()
|
static com.atlassian.util.concurrent.Supplier<JSoupTester> |
getJSoupSupplier(net.sourceforge.jwebunit.junit.WebTester webTester)
Returns a supplier for the JSoupTester which might be used for querying the DOM with CSS selectors. |
int |
getTimeout()
|
com.gargoylesoftware.htmlunit.html.DomNode |
getWindowDomNode()
Expose internals for some tests. |
void |
gotoPage(URL initialURL)
|
protected void |
initWebClient()
Overridden to: set browser version not throw javascript exceptions set socket timeouts, and increase the number of client connections. |
boolean |
isJavascriptEnabled()
|
void |
setInputValue(String inputId,
String value)
Sets the input value of the given input. |
void |
setTextField(String fieldName,
String text)
Overridden to allow setting of hidden fields. |
void |
setTimeout(int timeout)
|
protected void |
setWorkingForm(com.gargoylesoftware.htmlunit.html.HtmlForm newForm)
Overridden for additional logging. |
void |
uncheckCheckbox(String checkBoxName)
Deselect a specified checkbox. |
void |
uncheckCheckbox(String checkBoxName,
String value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final com.gargoylesoftware.htmlunit.Cache newCache
Constructor Detail |
---|
public ConfluenceHtmlUnitDialog()
Method Detail |
---|
public void gotoPage(URL initialURL) throws net.sourceforge.jwebunit.exception.TestingEngineResponseException
gotoPage
in interface net.sourceforge.jwebunit.api.IJWebUnitDialog
gotoPage
in class HtmlUnitDialog
net.sourceforge.jwebunit.exception.TestingEngineResponseException
public void setTextField(String fieldName, String text)
setTextField
in interface net.sourceforge.jwebunit.api.IJWebUnitDialog
setTextField
in class HtmlUnitDialog
fieldName
- name of the input element or textareatext
- parameter value to submit for the element.public void uncheckCheckbox(String checkBoxName)
HtmlUnitDialog
uncheckCheckbox
in interface net.sourceforge.jwebunit.api.IJWebUnitDialog
uncheckCheckbox
in class HtmlUnitDialog
checkBoxName
- name of checkbox to be deselected.public void uncheckCheckbox(String checkBoxName, String value)
uncheckCheckbox
in interface net.sourceforge.jwebunit.api.IJWebUnitDialog
uncheckCheckbox
in class HtmlUnitDialog
protected void initWebClient()
initWebClient
in class HtmlUnitDialog
protected void setWorkingForm(com.gargoylesoftware.htmlunit.html.HtmlForm newForm)
protected com.gargoylesoftware.htmlunit.html.ClickableElement getButton(String buttonId)
public com.gargoylesoftware.htmlunit.html.DomNode getWindowDomNode()
public void setInputValue(String inputId, String value)
public boolean isJavascriptEnabled()
public int getTimeout()
public void setTimeout(int timeout)
public com.atlassian.util.concurrent.Supplier<JSoupTester> getJSoupSupplier()
public static com.atlassian.util.concurrent.Supplier<JSoupTester> getJSoupSupplier(net.sourceforge.jwebunit.junit.WebTester webTester)
The given WebTester is expected to have a ConfluenceHtmlUnitDialog configured. Do not cache references on the JSoupTester returned by the supplier as it might change after any interaction with the client (stale DOM). Please be aware that acquiring the JSoupTester results in the current page being re-parsed into an in-memory representation, adding to the time and resource-consumption due to JWebUnit's own parsing on page initialisation.
There is currently no way to relate an element in JWebUnit's DOM to one in JSoup's DOM, thus if you need to interact with the HTTP client (e.g. click elements) you'll have to use JWebUnit's facilities (e.g. XPath) for locating these elements.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |