1 package br.com.caelum.seleniumdsl;
2
3 public interface Form {
4
5 /**
6 * @param field
7 * the field's name or id
8 * @return the Field
9 */
10 public Field field(String field);
11
12 /**
13 * Clicks something on the page
14 *
15 * @param element
16 * can be the element ID, name or an xpath expression
17 */
18 public void click(String element);
19
20 /**
21 *
22 * @param selectField
23 * the select's name or id
24 * @return the SelectField
25 */
26 public SelectField selectField(String selectField);
27
28 /**
29 * Checks a checkbox
30 *
31 * @param checkbox
32 * the input's name or id
33 * @return the Form
34 */
35 public Form check(String checkbox);
36
37 /**
38 * Unchecks a checkbox
39 *
40 * @param checkbox
41 * the input's name or id
42 * @return the Form
43 */
44 public Form uncheck(String checkbox);
45
46 /**
47 * @param checkbox
48 * the input's name or id
49 * @return if the checkbox is checked
50 */
51 public boolean isChecked(String checkbox);
52
53 /**
54 * Submits this form
55 */
56 public void submit();
57
58 }