Permalink
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (67 sloc) 2.44 KB
bioguide: U000031
contact_form:
method: get
action: /Contact/ContactForm.htm
steps:
- visit: "http://upton.house.gov/contact/zipauth.htm"
- fill_in:
- name: zip5
selector: "form.zipform input[name='zip5']"
value: $ADDRESS_ZIP5
required: true
- name: zip4
selector: "form.zipform input[name='zip4']"
value: $ADDRESS_ZIP4
required: true
- click_on:
- value: Submit
selector: "form.zipform input[type='submit'][value='Submit']"
- find:
- selector: "form.zipform[name='contact']"
- fill_in:
- name: required-first
selector: "form.zipform[name='contact'] input[name='required-first']"
value: $NAME_FIRST
required: true
- name: required-last
selector: "form.zipform[name='contact'] input[name='required-last']"
value: $NAME_LAST
required: true
- name: required-address
selector: "form.zipform[name='contact'] input[name='required-address']"
value: $ADDRESS_STREET
required: true
- name: required-city
selector: "form.zipform[name='contact'] input[name='required-city']"
value: $ADDRESS_CITY
required: true
- name: zip5
selector: "form.zipform[name='contact'] input[name='zip5']"
value: $ADDRESS_ZIP5
required: true
- name: zip4
selector: "form.zipform[name='contact'] input[name='zip4']"
value: $ADDRESS_ZIP4
required: true
- name: required-email
selector: "form.zipform[name='contact'] input[name='required-email']"
value: $EMAIL
required: true
- name: required-message
selector: "form.zipform[name='contact'] textarea[name='required-message']"
value: $MESSAGE
required: true
- javascript:
- value: document.querySelector("form.zipform[name='contact'] textarea[name='required-message']").value = document.querySelector("form.zipform[name='contact'] textarea[name='required-message']").value.replace(/"/g, '');
- javascript:
- value: "document.querySelector('form.zipform').submit();"
- wait:
- value: 3
- find:
- selector: "span#ctl00_PageLink"
value: "Thank You"
success:
headers:
status: 200
body:
contains: Thanks for your request. We will try to address your message as soon as we are able