bioguide: G000577
contact_form:
  method: post
  action: "/htbin/formproc_za/zip-auth.txt%26form%3D/contact/email/email-zip-authenticated%26nobase%26fpGetVer%3D2"
  steps:
    - visit: "https://garretgraves.house.gov/contact"
    - fill_in:
        - name: required-zip5
          selector: "#required-zip5"
          value: $ADDRESS_ZIP5
          required: true
        - name: zip4
          selector: "#zip4"
          value: $ADDRESS_ZIP4
          required: true
    - click_on:
        - selector: "#submit"
    - javascript:
        - value: "Array.prototype.forEach.call(document.querySelectorAll('style,[rel=\"stylesheet\"],[type=\"text/css\"]'), function(element){ try{ element.parentNode.removeChild(element) } catch(err){} });"
    - fill_in:
        - name: required-first
          selector: "#required-first"
          value: $NAME_FIRST
          required: true
        - name: required-last
          selector: "#required-last"
          value: $NAME_LAST
          required: true
        - name: required-address
          selector: "#required-address"
          value: $ADDRESS_STREET
          required: true
        - name: required-city
          selector: "#required-city"
          value: $ADDRESS_CITY
          required: true
        - name: required-valid-email
          selector: "#required-valid-email"
          value: $EMAIL
          required: true
        - name: required-phone
          selector: "#required-phone"
          value: $PHONE
          required: true
        - name: required-message
          selector: "#required-message"
          value: $MESSAGE
          required: true
    - select:
        - name: required-prefix
          selector: "#required-prefix"
          value: $NAME_PREFIX
          required: true
          options:
            - Ms.
            - Miss
            - Mrs.
            - Mr.
            - Mr. and Mrs.
            - Rev.
            - Dr.
            - The Honorable
            - Rabbi
        - name: required-issue
          selector: "#required-issue"
          value: $TOPIC
          required: true
          options:
            Agriculture: Agriculture
            Animal Issues: Animals
            Arts and Humanities: Arts and Humanities
            Banking and Finance: Financial Services
            Casework Request - Help with a Federal Agency: Casework
            "Corps. Of Engineers, Maritime Issues": Water
            Defense and National Security: Defense and National Security
            Economy and Monetary Policy: Economy and Monetary Policy
            Education: Education
            Elections and Party Issues: Elections and Congress
            "Energy Policy - Oil and Gas, Carbon Policy": Energy and Minerals
            Environment: Environment
            Executive Branch - The President: Executive Branch
            "Family Issues - Adoption, Child Protective Services, etc.": Family Issues
            "Federal Budget - National Debt and Deficit ": Budget
            "FEMA and Dept. of Homeland Security ": Homeland Security and FEMA
            Firearms - 2nd Amendment Issues: Guns and Second Amendment
            Fisheries and Ocean Policies: Fisheries and Ocean Policies
            Foreign Affairs: Foreign Policy
            "Health - Insurance, Regulations, Research": Health
            Immigration Policy: Immigration
            "Judicial and Legal Issues - Judges, Sentencing, etc.": Judicary
            "LA State Issues, Local and Parish Concerns": State Issue
            "Labor Issues - Min Wage, Unions, Labor Regulations": Labor
            Medicare and Medicaid: Medicare and Medicaid
            National Parks and Federal Lands: Federal Lands
            "Science, Space and Technology": Science and Technology
            "Social Issues - LGBT, Marriage, Faith, Abortion": Social Issues
            "Social Security, Retirement and Disability Insurance": Social Security and Retirement Issues
            Taxes: Taxes
            "Telecommunications, Internet": Telecom
            Tours and Flag Requests: Tours
            Transportation Issues: Transportation
            Trade and Commerce: TRADE
            Veteran Affairs: Veteran Affairs
            "Welfare - SNAP, TANF, Unemployment": Welfare
        - name: required-response
          selector: "#required-response"
          value: "Y"
          required: true
          options:
            "Yes, please contact me": "Y"
            "No, I wanted to voice my opinion": "N"
    - javascript:
        - value: document.querySelector("#required-message").value = document.querySelector("#required-message").value.replace(/"/g, '');
    - recaptcha:
        - value: true
    - click_on:
        - selector: "#submit"
    - find:
        - selector: "#block-system-main > div > div > div > div > div > div > div > div > div > div > p:nth-child(1)"
  success:
    headers:
      status: 200
    body:
      contains: Thank you