Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PA and IN lower gov #243

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions states/IN/lower_dem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
bioguide:
contact_form:
steps:
#Example: https://indianahousedemocrats.org/members/vernon-smith/full#form_individual-member-contact

#Using MetaVariables so the config form doesn't have to be replaced often
#Using Texas Lower.yaml as a guide

#https://indianahousedemocrats.org/members
#Link to all the memembers just have to press thier name and then click contact to get to the web form

- visit: "https://indianahousedemocrats.org/members/vernon-smith/full#form_individual-member-contact"
- fill_in:
- name: full_name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix tabbing.

selector: "input[name=full_name]"
value: $NAME_FULL
required: true
- name: email
selector: "input[name=email]"
value: $EMAIL
required: true
- name: street_address
selector: "input[name=street_address]"
value: $ADDRESS_STREET
required: true
- name: city
selector: "input[name=city]"
value: $ADDRESS_CITY
required: true
- name: zip
selector: "input[name=zip]"
value: $ADDRESS_ZIP5
required: true
- name: phone
selector: "input[name=phone]"
value: $PHONE
required: true

#Skipped the file upload section

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove. (We know we're not uploading any files.)

- name: subject_line
selector: "input[name=subject_line]"
value: $SUBJECT
required: true
- name: message
selector: "input[name=message]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selector is textarea

value: $MESSAGE
required: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix tabbing

- name: g-recaptcha-response
selector: '#g-recaptcha-response'
value: $CAPTCHA_SOLUTION
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't necessary. Generally, only the 'recaptcha' directive is required. There are some rare circumstances when we have to issue instructions on the recaptchas.

- click_on:
- value: "button[class='button']"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things here - First, you want a 'selector' directive to target the element. Second, there are three buttons on the page defined like this. if you use "button[class='button']" it will click the first button that matches that selector, which is higher on the page and not the one you are looking for. You'll have to include additional attributes as part of the selector to hit the right button. Give it a try!

- recaptcha:
- value: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move captcha above the final button click. (We need to solve the captcha before we click the button to submit the form.)


success:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix tabbing. (Should be in line with "steps:")

body:
contains: "Your form has been successfully submitted!"
123 changes: 123 additions & 0 deletions states/IN/lower_repub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
bioguide:
contact_form:
steps:
- visit: "https://www.indianahouserepublicans.com/forms/contact-your-representative/"
- select:
- name: "submitted[choose][rep]"
selector: "#edit-submitted-choose-rep"
value: "$CHOOSE_REP"
required: true
options:
"David Abbott": "Budget"
"Michael Aylesworth": "Education"
"Ron Bacon": "Environmental Conerns"
"Beau Baird": "General Views"
"Brad Barrett": "Homelessness"
"Steven Bartels": "Housing"
"Robert Behning": "Ideas or Suggestions"
"Bruce Borders": "Public Safety"
"Brian Bosma": "Brian Bosma"
"Tim Brown": "Tim Brown"
"Woody Burton": "Woody Burton"
"Martin Carbaugh": "Martin Carbaugh"
"Bob Cherry": "Bob Cherry"
"Ed Clere": "Ed Clere"
"Tony Cook": "Tony Cook"
"Steve Davisson": "Steve Davisson"
"Dale DeVon": "Dale DeVon"
"Sean Eberhart": "Sean Eberhart"
"Jeff Ellington": "Jeff Ellington"
"Karen Engleman": "Karen Engleman"
"Randy Frye": "Randy Frye"
"Chuck Goodrich": "Chuck Goodrich"
"Douglas Gutwien": "Douglas Gutwien"
"Bob Heaton": "Bob Heaton"
"Dave Heine": "Dave Heine"
"Matt Hostettler": "Matt Hostettler"
"Todd Huston": "Todd Huston"
"Jack Jordan": "Jack Jordan"
"Christopher Judy": "Christopher Judy"
"Mike Karickhoff": "Mike Karickhoff"
"Cindy Kirchhofer": "Cindy Kirchhofer"
"Ryan Lauer": "Ryan Lauer"
"Don Lehe": "Don Lehe"
"Matt Lehman": "Matt Lehman"
"Dan Leonard": "Dan Leonard"
"Shane Lindauer": "Shane Lindauer"
"Jim Lucas": "Jim Lucas"
"Randy Lyness": "Randy Lyness"
"Ethan Manning": "Ethan Manning"
"Chris May": "Chris May"
"Peggy Mayfield": "Peggy Mayfield"
"Wendy McNamara": "Wendy McNamara"
"Douglas Miller": "Douglas Miller"
"Bob Morris": "Bob Morris"
"Alan Morrison": "Alan Morrison"
"Sharon Negele": "Sharon Negele"
"Curt Nisly": "Curt Nisly"
"J.D Prescott": "J.D Prescott"
"Jim Pressel": "Jim Pressel"
"Tom Saunders": "Tom Saunders"
"Donna Schailbley": "Donna Schailbley"
"Dollyne Sherman": "Dollyne Sherman"
"Ben Smaltz": "Ben Smaltz"
"Ed Soliday": "Ed Soliday"
"Mike Speedy": "Mike Speedy"
"Greg Steuerwaid": "Greg Steuerwaid"
"Holli Sullivan": "Holli Sullivan"
"Jeff Thompson": "Jeff Thompson"
"Jerry Torr": "Jerry Torr"
"Heath VanNatter": "Heath VanNatter"
"Ann Vermillon": "Ann Vermillon"
"Timothy Wesco": "Timothy Wesco"
"David A. Wolkins": "David A. Wolkins"
"John Young": "John Young"
"Denny Zent": "Denny Zent"
"Cindy Ziemke": "Cindy Ziemke"
- fill_in:
- name: "contact_first_name_0"
selector: "#contact_first_name_0"
value: $FIRST_NAME
required: true
- name: "contact_middle_name_0"
selector: "#contact_middle_name_0"
value: $MIDDLE_NAME
required: true
- name: "contact_last_name_0"
selector: "#contact_last_name_0"
value: $LAST_NAME
required: true
- name: "contact_email_0"
selector: "#contact_email_0"
value: $EMAIL
required: true
- name: "contact_phone_0"
selector: "#contact_phone_0"
value: $PHONE
required: true
- name: "contact_address_1"
selector: "#contact_address_1"
value: $ADDRESS1
required: true
- name: "contact_address_2"
selector: "#contact_address_2"
value: $ADDRESS2
required: false
- name: "contact_city_0"
selector: "#contact_city_0"
value: $CITY
required: false
- name: "contact_zip_code_0"
selector: "#contact_zip_code_0"
value: $ZIP
required: true
- name: "contact_message_0"
selector: "#contact_message_0"
value: $MESSAGE
required: true
- click_on:
- value: "Sumbit"
selector: "#submit"
success:
body:
contains: "Thank you for your message. It has been sent."
Binary file added states/PA/.DS_Store
Binary file not shown.
57 changes: 57 additions & 0 deletions states/PA/lower_dem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
contact_form:
steps:
# - visit: "https://www.pahouse.com/name=$META_OFFICIAL_LAST_NAME"
- visit: "https://www.pahouse.com/1/Contact/"

#this zipcode check happens occassionally.
- find:
- selector: "#zipcode"
- fill_in:
- name: zipcode
selector: "#zipcode"
value: $ADDRESS_ZIP5

- click_on:
- value: "Find Me!"
selector: gpsAllow

- fill_in:
- name: "input-modal-ContactForm-fName"
value: "$NAME_FIRST"
require: true
- name: "input-modal-ContactForm-lName"
value: "$NAME_LAST"
require: true
- name: "input-modal-ContactForm-Email"
value: "$EMAIL"
require: true
- name: "input-modal-ContactForm-Address"
value: "$ADDRESS_STREET"
require: true
- name: "input-modal-ContactForm-Phone"
value: "$PHONE"
require: true
- name: "input-modal-ContactForm-City"
value: "$ADDRESS_CITY"
require: true
- select:
- name: "input-modal-ContactForm-State"
value: $ADDRESS_STATE_POSTAL_ABBREV
required: true
options: US_STATES
- fill_in:
- name: "input-modal-ContactForm-Zip"
value: "$ADDRESS_ZIP5"
require: true
- name: "input-modal-ContactForm-Subject"
value: "$SUBJECT"
require: true
- name: "input-modal-ContactForm-Message"
value: "$MESSAGE"
require: true
- click_on:
- value: "Submit"
selector: "modalContactForm-submit"
success:
body:
contains: "Thank you. Your feedback has been sent"
41 changes: 41 additions & 0 deletions states/PA/lower_repub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
contact_form:
steps:
- visit: "http://www.stevebarrar.com/contact.aspx" # change to each web address
- fill_in:
- name: "ctl00$ContentPlaceHolder1$txtFirstName"
selector: "ctl00_ContentPlaceHolder1_txtFirstName"
value: $NAME_FIRST
required: true
- name: "ctl00$ContentPlaceHolder1$txtLastName"
selector: "ctl00_ContentPlaceHolder1_txtLastName"
value: $NAME_LAST
required: true
- name: "ctl00$ContentPlaceHolder1$txtPhone"
selector: "ctl00_ContentPlaceHolder1_txtPhone"
value: $PHONE
required: true
- name: "ctl00$ContentPlaceHolder1$txtEmail"
selector: "ctl00_ContentPlaceHolder1_txtEmail"
value: $EMAIL
required: true
- name: "ctl00$ContentPlaceHolder1$txtFindYourRepAddress"
selector: "ctl00_ContentPlaceHolder1_txtFindYourRepAddress"
value: $ADDRESS_STREET
required: true
- name: "ctl00$ContentPlaceHolder1$txtFindYourRepCity"
selector: "ctl00_ContentPlaceHolder1_txtFindYourRepCity"
value: $ADDRESS_CITY
required: true
- name: "ctl00$ContentPlaceHolder1$txtFindYourRepZip"
selector: "ctl00_ContentPlaceHolder1_txtFindYourRepZip"
value: $ADDRESS_ZIP5
required: true
- name: "ctl00$ContentPlaceHolder1$txtAction"
selector: "ctl00_ContentPlaceHolder1_txtAction"
value: $MESSAGE
- click_on:
- value: ""
selector: "ctl00_ContentPlaceHolder1_btnSubmitContact"
success:
body:
contains: "Your feedback has been received"