com.atlassian.confluence.htmlunit
Class ConfluenceHtmlUnitDialog

java.lang.Object
  extended by com.atlassian.confluence.htmlunit.HtmlUnitDialog
      extended by com.atlassian.confluence.htmlunit.ConfluenceHtmlUnitDialog
All Implemented Interfaces:
net.sourceforge.jwebunit.api.IJWebUnitDialog

public class ConfluenceHtmlUnitDialog
extends HtmlUnitDialog

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.PageCreator cacher
           
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.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.
protected  void setWorkingForm(com.gargoylesoftware.htmlunit.html.HtmlForm newForm)
          Overridden for additional logging.
 
Methods inherited from class com.atlassian.confluence.htmlunit.HtmlUnitDialog
beginAt, checkCheckbox, checkCheckbox, clickButton, clickButtonWithText, clickElementByXPath, clickLink, clickLinkWithExactText, clickLinkWithImage, clickLinkWithText, clickRadioOption, closeBrowser, closeWindow, getButtonWithText, getCookies, getCurrentPage, getCurrentPageTitle, getElement, getElementAttributByXPath, getElementTextByXPath, getForm, getHiddenFieldValue, getHtmlTable, getInputStream, getInputStream, getPageSource, getPageText, getPageTitle, getPageURL, getResetButton, getSelectedOptions, getSelectedRadio, getSelectOptionLabelForValue, getSelectOptionValueForLabel, getSelectOptionValues, getServerResponse, getSubmitButton, getSubmitButton, getTable, getTestContext, getTextFieldValue, getWindowCount, gotoFrame, gotoRootWindow, gotoWindow, gotoWindow, gotoWindowByTitle, hasButton, hasButtonWithText, hasElement, hasElementByXPath, hasForm, hasForm, hasFormInputNamed, hasFormParameterNamed, hasFormSelectNamed, hasFrame, hasLink, hasLinkWithExactText, hasLinkWithImage, hasLinkWithText, hasRadioOption, hasResetButton, hasResetButton, hasSelectOption, hasSelectOptionValue, hasSubmitButton, hasSubmitButton, hasSubmitButton, hasTable, hasWindow, hasWindowByTitle, isCheckboxSelected, isCheckboxSelected, isMatchInElement, isTextInElement, isTextInTable, reset, selectOptions, setExpectedJavaScriptAlert, setExpectedJavaScriptConfirm, setExpectedJavaScriptPrompt, setScriptingEnabled, setWorkingForm, setWorkingForm, submit, submit, submit, uncheckCheckbox, uncheckCheckbox, unselectOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

newCache

public static final com.gargoylesoftware.htmlunit.Cache newCache

cacher

public static final com.gargoylesoftware.htmlunit.PageCreator cacher
Constructor Detail

ConfluenceHtmlUnitDialog

public ConfluenceHtmlUnitDialog()
Method Detail

gotoPage

public void gotoPage(URL initialURL)
              throws net.sourceforge.jwebunit.exception.TestingEngineResponseException
Specified by:
gotoPage in interface net.sourceforge.jwebunit.api.IJWebUnitDialog
Overrides:
gotoPage in class HtmlUnitDialog
Throws:
net.sourceforge.jwebunit.exception.TestingEngineResponseException

setTextField

public void setTextField(String fieldName,
                         String text)
Overridden to allow setting of hidden fields.

Specified by:
setTextField in interface net.sourceforge.jwebunit.api.IJWebUnitDialog
Overrides:
setTextField in class HtmlUnitDialog
Parameters:
fieldName - name of the input element or textarea
text - parameter value to submit for the element.

initWebClient

protected void initWebClient()
Overridden to:

Overrides:
initWebClient in class HtmlUnitDialog

setWorkingForm

protected void setWorkingForm(com.gargoylesoftware.htmlunit.html.HtmlForm newForm)
Overridden for additional logging.


getButton

protected com.gargoylesoftware.htmlunit.html.ClickableElement getButton(String buttonId)
Overridden to use the correct window in the case of pop-ups.


getWindowDomNode

public com.gargoylesoftware.htmlunit.html.DomNode getWindowDomNode()
Expose internals for some tests.


setInputValue

public void setInputValue(String inputId,
                          String value)
Sets the input value of the given input. Only use this when input is not in a form and you don't want 'form not present' assertion failure.


isJavascriptEnabled

public boolean isJavascriptEnabled()


Copyright © 2003-2010 Atlassian. All Rights Reserved.