mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
500aff259e
(type defaults to 'submit' according to HTML 4/5 specs)
291 lines
8.9 KiB
Text
291 lines
8.9 KiB
Text
<h1>Form</h1>
|
|
|
|
<form action="/form" method="post">
|
|
|
|
<p>
|
|
<label for="form_title">Title</label>
|
|
<select name="form[title]" id="form_title">
|
|
<option>Mrs</option>
|
|
<option>Mr</option>
|
|
<option>Miss</option>
|
|
</select>
|
|
</p>
|
|
|
|
|
|
<p>
|
|
<label for="form_other_title">Other title</label>
|
|
<select name="form[other_title]" id="form_other_title">
|
|
<option>Mrs</option>
|
|
<option>Mr</option>
|
|
<option>Miss</option>
|
|
</select>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_first_name">
|
|
First Name
|
|
<input type="text" name="form[first_name]" value="John" id="form_first_name"/>
|
|
</label>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_last_name">Last Name</label>
|
|
<input type="text" name="form[last_name]" value="Smith" id="form_last_name"/>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_name_explanation">Explanation of Name</label>
|
|
<textarea name="form[name_explanation]" id="form_name_explanation"></textarea>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_name">Name</label>
|
|
<input type="text" name="form[name]" value="John Smith" id="form_name"/>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_schmooo">Schmooo</label>
|
|
<input type="schmooo" name="form[schmooo]" value="This is Schmooo!" id="form_schmooo"/>
|
|
</p>
|
|
|
|
<p>
|
|
<label>Street<br/>
|
|
<input type="text" name="form[street]" value="Sesame street 66"/>
|
|
</label>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_phone">Phone</label>
|
|
<input name="form[phone]" value="+1 555 7021" id="form_phone"/>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_password">Password</label>
|
|
<input type="password" name="form[password]" value="seeekrit" id="form_password"/>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_terms_of_use">Terms of Use</label>
|
|
<input type="hidden" name="form[terms_of_use]" value="0" id="form_terms_of_use_default">
|
|
<input type="checkbox" name="form[terms_of_use]" value="1" id="form_terms_of_use">
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_image">Image</label>
|
|
<input type="file" name="form[image]" id="form_image"/>
|
|
</p>
|
|
|
|
<p>
|
|
<input type="hidden" name="form[token]" value="12345" id="form_token"/>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_locale">Locale</label>
|
|
<select name="form[locale]" id="form_locale">
|
|
<option value="sv">Swedish</option>
|
|
<option selected="selected" value="en">English</option>
|
|
<option value="fi">Finish</option>
|
|
<option value="no">Norwegian</option>
|
|
<option value="jo">John's made-up language</option>
|
|
<option value="jbo"> Lojban </option>
|
|
</select>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_region">Region</label>
|
|
<select name="form[region]" id="form_region">
|
|
<option>Sweden</option>
|
|
<option selected="selected">Norway</option>
|
|
<option>Finland</option>
|
|
</select>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_city">City</label>
|
|
<select name="form[city]" id="form_city">
|
|
<option>London</option>
|
|
<option>Stockholm</option>
|
|
<option>Paris</option>
|
|
</select>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_tendency">Tendency</label>
|
|
<select name="form[tendency]" id="form_tendency"></select>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_description">Description</label></br>
|
|
<textarea name="form[description]" id="form_description">Descriptive text goes here</textarea>
|
|
<p>
|
|
|
|
<p>
|
|
<input type="radio" name="form[gender]" value="male" id="gender_male"/>
|
|
<label for="gender_male">Male</label>
|
|
<input type="radio" name="form[gender]" value="female" id="gender_female" checked="checked"/>
|
|
<label for="gender_female">Female</label>
|
|
<input type="radio" name="form[gender]" value="both" id="gender_both"/>
|
|
<label for="gender_both">Both</label>
|
|
</p>
|
|
|
|
<p>
|
|
<input type="checkbox" value="dog" name="form[pets][]" id="form_pets_dog" checked="checked"/>
|
|
<label for="form_pets_dog">Dog</label>
|
|
<input type="checkbox" value="cat" name="form[pets][]" id="form_pets_cat"/>
|
|
<label for="form_pets_cat">Cat</label>
|
|
<input type="checkbox" value="hamster" name="form[pets][]" id="form_pets_hamster" checked="checked"/>
|
|
<label for="form_pets_hamster">Hamster</label>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_languages">Languages</label>
|
|
<select name="form[languages][]" id="form_languages" multiple="multiple">
|
|
<option>Ruby</option>
|
|
<option>SQL</option>
|
|
<option>HTML</option>
|
|
<option>Javascript</option>
|
|
</select>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_underwear">Underwear</label>
|
|
<select name="form[underwear][]" id="form_underwear" multiple="multiple">
|
|
<option selected="selected">Boxer Briefs</option>
|
|
<option>Boxers</option>
|
|
<option selected="selected">Briefs</option>
|
|
<option selected="selected">Commando</option>
|
|
<option selected="selected">Frenchman's Pantalons</option>
|
|
<option selected="selected" value="thermal">Long Johns</option>
|
|
</select>
|
|
</p>
|
|
|
|
<div style="display:none;">
|
|
<label for="form_first_name_hidden">
|
|
Super Secret
|
|
<input type="text" name="form[super_secret]" value="test123" id="form_super_secret"/>
|
|
</label>
|
|
</div>
|
|
|
|
<p>
|
|
<label for="form_disabled_text_field">
|
|
Disabled Text Field
|
|
<input type="text" name="form[disabled_text_field]" value="Should not see me" id="form_disabled_text_field" disabled="disabled" />
|
|
</label>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_disabled_textarea">
|
|
Disabled Textarea
|
|
<textarea name="form[disabled_textarea]" value="Should not see me" id="form_disabled_textarea" disabled="disabled"></textarea>
|
|
</label>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_disabled_checkbox">
|
|
Disabled Checkbox
|
|
<input type="checkbox" name="form[disabled_checkbox]" value="Should not see me" id="form_disabled_checkbox" checked="checked" disabled="disabled" />
|
|
</label>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_disabled_radio">
|
|
Disabled Checkbox
|
|
<input type="radio" name="form[disabled_radio]" value="Should not see me" id="form_disabled_radio" checked="checked" disabled="disabled" />
|
|
</label>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_disabled_select">
|
|
Disabled Select
|
|
<select name="form[disabled_select]" id="form_disabled_select" disabled="disabled">
|
|
<option value="Should not see me" selected="selected">Should not see me</option>
|
|
</select>
|
|
</label>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_disabled_file">
|
|
Disabled File
|
|
<input type="file" name="form[disabled_file]" value="/should/not/see/me" id="form_disabled_file" disabled="disabled" />
|
|
</label>
|
|
</p>
|
|
|
|
<p>
|
|
<input type="button" name="form[fresh]" id="fresh_btn" value="i am fresh"/>
|
|
<input type="submit" name="form[awesome]" id="awe123" value="awesome"/>
|
|
<input type="submit" name="form[crappy]" id="crap321" value="crappy"/>
|
|
<input type="image" name="form[okay]" id="okay556" value="okay" alt="oh hai thar"/>
|
|
<button type="submit" id="click_me_123" value="click_me">Click me!</button>
|
|
<button type="submit" name="form[no_value]">No Value!</button>
|
|
<button id="no_type">No Type!</button>
|
|
</p>
|
|
</form>
|
|
|
|
<form id="get-form" action="/form/get?foo=bar" method="get">
|
|
<p>
|
|
<label for="form_middle_name">Middle Name</label>
|
|
<input type="text" name="form[middle_name]" value="Darren" id="form_middle_name"/>
|
|
</p>
|
|
|
|
<p>
|
|
<input type="submit" name="form[mediocre]" id="mediocre" value="med"/>
|
|
<p>
|
|
</form>
|
|
|
|
<form action="/upload" method="post" enctype="multipart/form-data">
|
|
<p>
|
|
<label for="form_file_name">File Name</label>
|
|
<input type="file" name="form[file_name]" id="form_file_name"/>
|
|
</p>
|
|
|
|
<p>
|
|
<label for="form_document">Document</label>
|
|
<input type="file" name="form[document]" id="form_document"/>
|
|
</p>
|
|
|
|
<p>
|
|
<input type="submit" value="Upload"/>
|
|
<p>
|
|
</form>
|
|
|
|
<form action="/redirect" method="post">
|
|
<p>
|
|
<input type="submit" value="Go FAR"/>
|
|
</p>
|
|
</form>
|
|
|
|
<form action="/form" method="post">
|
|
<p>
|
|
<label for="html5_email">Html5 Email</label>
|
|
<input type="email" name="form[html5_email]" value="person@email.com" id="html5_email"/>
|
|
</p>
|
|
<p>
|
|
<label for="html5_url">Html5 Url</label>
|
|
<input type="url" name="form[html5_url]" value="http://www.example.com" id="html5_url"/>
|
|
</p>
|
|
<p>
|
|
<label for="html5_search">Html5 Search</label>
|
|
<input type="search" name="form[html5_search]" value="what are you looking for" id="html5_search"/>
|
|
</p>
|
|
<p>
|
|
<label for="html5_tel">Html5 Tel</label>
|
|
<input type="tel" name="form[html5_tel]" value="911" id="html5_tel"/>
|
|
</p>
|
|
<p>
|
|
<label for="html5_color">Html5 Color</label>
|
|
<input type="color" name="form[html5_color]" value="#FFF" id="html5_color"/>
|
|
</p>
|
|
|
|
<p>
|
|
<input type="submit" name="form[html5_submit]" value="html5_submit"/>
|
|
</p>
|
|
</form>
|
|
|
|
<form action="/form" method="post">
|
|
<p>
|
|
<button type="submit" name="form[button]" value="button_first">Just an input that came first</button>
|
|
<button type="submit" name="form[button]" value="button_second">Just an input</button>
|
|
<input type="submit" name="form[button]" value="Just a button that came first"/>
|
|
<input type="submit" name="form[button]" value="Just a button"/>
|
|
</p>
|
|
</form>
|