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

updates to solve math and question challenges #70

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

jscanzoni
Copy link

No description provided.

@Hainish
Copy link
Member

Hainish commented Jul 15, 2015

Nice, thanks for this! Can you give a few examples of forms this works for? Also would be good to add tests.

@jscanzoni
Copy link
Author

Here are the three scenarios I was looking to solve:

https://www.flsenate.gov/Senators/s10

    - math:
        - name: math_qna
          question_selector: "label[for='math-test']"
          answer_selector: "#math-test"

http://www.mnsenaterepublicans.com/our-senators/gary-dahms/

    - math:
        - name: mathquestion
          selector: "Just to prove you are a human, please solve the equation: "
          question_selector: "#captcha_row"
          answer_selector: "#contact_form input[name='captcha']"

http://www.lrc.ky.gov/Messages/H026.aspx

    - question:
        - name: qna
          question_selector: "#LabelQ"
          answer_selector: "#TextBoxQ"
          pairs:
            - q: "Is ice hot or cold?"
              a: "cold"
            - q: "Is fire hot or cold?"
              a: "hot"
            - q: "Is water wet or dry?"
              a: "wet"

jscanzoni added 8 commits July 28, 2015 17:24
If an hash key is passed to a select action rather than the value,
script will try to convert it and use the value instead
Conflicts:
	app/models/congress_member_action.rb
	tasks/phantom-dc.rake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants