Permalink
Fetching contributors…
Cannot retrieve contributors at this time
95 lines (95 sloc) 3.02 KB
bioguide: P000593
contact_form:
method: post
action: /submit-contact-iq.aspx
steps:
- visit: "https://perlmutter.house.gov/contact/"
- fill_in:
- name: required-prefix
selector: "#contact input[name='required-prefix']"
value: $NAME_PREFIX
required: true
- name: required-first
selector: "#contact input[name='required-first']"
value: $NAME_FIRST
required: true
- name: required-last
selector: "#contact input[name='required-last']"
value: $NAME_LAST
required: true
- name: required-address
selector: "#contact input[name='required-address']"
value: $ADDRESS_STREET
required: true
- name: required-city
selector: "#contact input[name='required-city']"
value: $ADDRESS_CITY
required: true
- name: zip5
selector: "#contact input[name='zip5']"
value: $ADDRESS_ZIP5
required: true
- name: zip4
selector: "#contact input[name='zip4']"
value: $ADDRESS_ZIP4
required: true
- name: required-email
selector: "#contact input[name='required-email']"
value: $EMAIL
required: true
- name: required-message
selector: "#contact textarea[name='required-message']"
value: $MESSAGE
required: true
- select:
- name: required-issue
selector: "#contact select[name='required-issue']"
value: $TOPIC
required: true
options:
Agriculture: AGR
Budget: BUD
Defense: DEF
Economy: ECON
Education: EDU
Energy: ENE
Environment: ENV
Financial Services: FIN
Foreign Relations: INT
Government Reform: GOV
Gun Safety: GUN
Healthcare: HEA
Homeland Security: HOM
Immigration: IMM
Judiciary: JUD
Labor and Workforce: LAB
Medicare: MCARE
Natural Resources: NAT
Small Business: SB
Social Security: SSEC
Tours: TOUR
Trade: TRADE
Transportation: TRA
" Veterans": VET
Women: WOM
Other: "\_"
- name: required-response
selector: "#required-response"
value: "Y"
required: false
options:
"Yes, please contact me": "Y"
"No, I wanted to voice my opinion": "N"
- javascript:
- value: document.querySelector("#contact textarea[name='required-message']").value = document.querySelector("#contact textarea[name='required-message']").value.replace(/"/g, '');
- click_on:
- value: Send Email
selector: "#contact input[type='submit'][value='Send Email']"
- find:
- selector: "#ctl00_PageLink"
value: THANK YOU
success:
headers:
status: 200
body:
contains: Thank you for emailing Ed.