public class HtmlUnitUtil extends Object
Constructor and Description |
---|
HtmlUnitUtil() |
Modifier and Type | Method and Description |
---|---|
static com.gargoylesoftware.htmlunit.html.HtmlPage |
clickAnchorContainingText(com.gargoylesoftware.htmlunit.html.HtmlPage page,
String... values) |
static com.gargoylesoftware.htmlunit.html.HtmlPage |
clickButton(com.gargoylesoftware.htmlunit.html.HtmlPage page,
String name) |
static com.gargoylesoftware.htmlunit.html.HtmlPage |
clickClockInOrOutButton(com.gargoylesoftware.htmlunit.html.HtmlPage page) |
static com.gargoylesoftware.htmlunit.html.HtmlPage |
clickInputContainingText(com.gargoylesoftware.htmlunit.html.HtmlPage page,
String... values) |
static com.gargoylesoftware.htmlunit.html.HtmlPage |
clickLunchInOrOutButton(com.gargoylesoftware.htmlunit.html.HtmlPage page,
String lunchAction) |
static void |
createTempFile(com.gargoylesoftware.htmlunit.html.HtmlPage page) |
static void |
createTempFile(com.gargoylesoftware.htmlunit.html.HtmlPage page,
String name) |
protected static boolean |
elementContainsValues(com.gargoylesoftware.htmlunit.html.HtmlElement element,
String... values) |
static com.gargoylesoftware.htmlunit.html.HtmlPage |
fillOutForm(com.gargoylesoftware.htmlunit.html.HtmlPage page,
Map<String,Object> criteria) |
static com.gargoylesoftware.htmlunit.html.HtmlAnchor |
getAnchorContainingText(com.gargoylesoftware.htmlunit.html.HtmlPage page,
String... values) |
static com.gargoylesoftware.htmlunit.html.HtmlForm |
getDefaultForm(com.gargoylesoftware.htmlunit.html.HtmlPage htmlPage) |
static com.gargoylesoftware.htmlunit.html.HtmlInput |
getInputContainingText(com.gargoylesoftware.htmlunit.html.HtmlForm form,
String text) |
static com.gargoylesoftware.htmlunit.html.HtmlInput |
getInputContainingText(com.gargoylesoftware.htmlunit.html.HtmlPage page,
String... values) |
static List<com.gargoylesoftware.htmlunit.html.HtmlInput> |
getInputsContainingText(com.gargoylesoftware.htmlunit.html.HtmlPage page,
String... values) |
static String |
getOnClickHref(com.gargoylesoftware.htmlunit.html.HtmlElement button)
Method to obtain the HREF onclick='' value from the button when
the client side typically processes the request.
|
static com.gargoylesoftware.htmlunit.html.HtmlPage |
gotoPageAndLogin(com.gargoylesoftware.htmlunit.WebClient webClient,
String url) |
static com.gargoylesoftware.htmlunit.html.HtmlPage |
gotoPageAndLogin(com.gargoylesoftware.htmlunit.WebClient webClient,
String url,
boolean enableJavascript) |
static boolean |
pageContainsText(com.gargoylesoftware.htmlunit.html.HtmlPage page,
String text) |
static void |
setFieldValue(com.gargoylesoftware.htmlunit.html.HtmlPage page,
String fieldId,
String fieldValue) |
public HtmlUnitUtil()
public static com.gargoylesoftware.htmlunit.html.HtmlPage gotoPageAndLogin(com.gargoylesoftware.htmlunit.WebClient webClient, String url) throws Exception
url
- Exception
public static com.gargoylesoftware.htmlunit.html.HtmlPage gotoPageAndLogin(com.gargoylesoftware.htmlunit.WebClient webClient, String url, boolean enableJavascript) throws Exception
url
- enableJavascript
- Exception
public static boolean pageContainsText(com.gargoylesoftware.htmlunit.html.HtmlPage page, String text)
public static com.gargoylesoftware.htmlunit.html.HtmlPage fillOutForm(com.gargoylesoftware.htmlunit.html.HtmlPage page, Map<String,Object> criteria) throws Exception
page:
- current html pagecriteria:
- The key is the field name and the value is a string array which contains the field value and the field type which can be chosen from TkTestConstantsException
public static String getOnClickHref(com.gargoylesoftware.htmlunit.html.HtmlElement button)
button
- public static com.gargoylesoftware.htmlunit.html.HtmlPage clickButton(com.gargoylesoftware.htmlunit.html.HtmlPage page, String name) throws Exception
page:
- current html page //NOTE doesnt seem to work currently for js setting of form variablesname:
- the button nameException
public static com.gargoylesoftware.htmlunit.html.HtmlPage clickClockInOrOutButton(com.gargoylesoftware.htmlunit.html.HtmlPage page) throws Exception
Exception
public static com.gargoylesoftware.htmlunit.html.HtmlPage clickLunchInOrOutButton(com.gargoylesoftware.htmlunit.html.HtmlPage page, String lunchAction) throws Exception
Exception
public static com.gargoylesoftware.htmlunit.html.HtmlPage clickInputContainingText(com.gargoylesoftware.htmlunit.html.HtmlPage page, String... values) throws Exception
Exception
public static com.gargoylesoftware.htmlunit.html.HtmlInput getInputContainingText(com.gargoylesoftware.htmlunit.html.HtmlPage page, String... values) throws Exception
Exception
public static final void setFieldValue(com.gargoylesoftware.htmlunit.html.HtmlPage page, String fieldId, String fieldValue)
public static List<com.gargoylesoftware.htmlunit.html.HtmlInput> getInputsContainingText(com.gargoylesoftware.htmlunit.html.HtmlPage page, String... values) throws Exception
Exception
protected static boolean elementContainsValues(com.gargoylesoftware.htmlunit.html.HtmlElement element, String... values)
public static com.gargoylesoftware.htmlunit.html.HtmlPage clickAnchorContainingText(com.gargoylesoftware.htmlunit.html.HtmlPage page, String... values) throws Exception
Exception
public static com.gargoylesoftware.htmlunit.html.HtmlAnchor getAnchorContainingText(com.gargoylesoftware.htmlunit.html.HtmlPage page, String... values) throws Exception
Exception
public static void createTempFile(com.gargoylesoftware.htmlunit.html.HtmlPage page) throws Exception
Exception
public static void createTempFile(com.gargoylesoftware.htmlunit.html.HtmlPage page, String name) throws Exception
Exception
public static com.gargoylesoftware.htmlunit.html.HtmlInput getInputContainingText(com.gargoylesoftware.htmlunit.html.HtmlForm form, String text) throws Exception
Exception
public static com.gargoylesoftware.htmlunit.html.HtmlForm getDefaultForm(com.gargoylesoftware.htmlunit.html.HtmlPage htmlPage)
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.