9 <label for="input_field">Input</label>
10 <input data-validate="required" type="text" name="input_field" />
11 <label for="input_field2">Input 2</label>
12 <input data-validate="required" value="gorch" type="text" name="input_field2" />
14 <label for="input_check">Checkbox</label>
15 <input data-validate="required" value="0" type="checkbox" name="input_check" />
17 <label for="select_field">Select</label>
18 <select data-validate="required" name="select_field">
19 <option value="1">foo</option>
20 <option value="2">bar</option>
21 <option value="3" selected="selected">oof</option>
22 <option value="4">rab</option>
28 my $z = HTML::Zoom->from_html($tmpl);
31 $z->select('input')->collect({
35 is(scalar @fields,2,"correctly extracted all inputs");
39 ($expect = $tmpl) =~ s#name="input_field" />#name="input_field" /><div>cluck</div>#;
42 $z->select('input[name="input_field"]')
43 ->add_after(\"<div>cluck</div>")
47 ($expect = $tmpl) =~ s#Input</label>#Input</label><div>cluck</div>#;
50 $z->select('input[name="input_field"]')
51 ->add_before(\"<div>cluck</div>")