Forms

Crawljax can fill in multiple values in forms

Contact

Gender:Male Female
Name:
Phone:
Type:
Active:

Example Code

CrawljaxConfigurationBuilder builder = CrawljaxConfiguration.builderFor(URL);
...
InputSpecification input = new InputSpecification();
Form contactForm = new Form();
contactForm.field("male").setValues(true, false);
contactForm.field("female").setValues(false, true);
contactForm.field("name").setValues("Bob", "Alice", "John");
contactForm.field("phone").setValues("1234567890", "1234888888", "");
contactForm.field("type").setValues("Student", "Teacher");
contactForm.field("active").setValues(true);
input.setValuesInForm(contactForm).beforeClickElement("button").withText("Save");
...
builder.setInputSpecification(input);