public final class InputSpecification extends Object
Name:
Phone:
Mobile:
Agree to licence:
Other:content
JAVA:
InputSpecification input = new InputSpecification();
//for fields with text
input.field("name").setValue("John Doe");
input.field("phone", "mobile").setValue("1234567890");
//for checkboxes
input.field("agreelicence").setValue(true);
Crawljax will set Name, Phone, Mobile, and Agree values. It will enter a random string in
the Other field if enabled in CrawljaxConfiguration| Constructor and Description |
|---|
InputSpecification() |
| Modifier and Type | Method and Description |
|---|---|
InputField |
field(String fieldName)
Specifies an input field to assign a value to.
|
InputField |
fields(String... fieldNames)
Specifies input fields to assign one value to.
|
com.google.common.collect.ImmutableList<CrawlElement> |
getCrawlElements() |
com.google.common.collect.ImmutableListMultimap<String,String> |
getFormFieldNames() |
com.google.common.collect.ImmutableListMultimap<String,String> |
getFormFieldValues() |
FormAction |
setValuesInForm(Form form)
Links the form with an HTML element which can be clicked.
|
public InputField field(String fieldName)
fieldName - the id or name attribute of the input fieldpublic InputField fields(String... fieldNames)
fieldNames - the ids or names of the input fieldspublic FormAction setValuesInForm(Form form)
form - the collection of the input fieldsFormpublic com.google.common.collect.ImmutableListMultimap<String,String> getFormFieldNames()
public com.google.common.collect.ImmutableListMultimap<String,String> getFormFieldValues()
public com.google.common.collect.ImmutableList<CrawlElement> getCrawlElements()
Copyright © 2007-2013. All Rights Reserved.