-
Notifications
You must be signed in to change notification settings - Fork 2
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
08/07/24 form filler #214
08/07/24 form filler #214
Conversation
app/services/applier/form_filler.rb
Outdated
def process | ||
p "Hello from FormFiller!" | ||
submit_application | ||
visit_url | ||
click_apply_button | ||
fill_in_all_fields | ||
sleep 2 | ||
click_submit_button | ||
confirm_submission_was_successful | ||
ensure | ||
@session.quit | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about something like this instead ?
def process
visit_url
fill_application_form
click_submit_button
# sleep 2 add this to click_submit_button
verify_submission # instead of confirm_submission_was_successful
ensure
@session.quit
end
private
def fill_application_form
click_apply_button
fill_in_all_fields
end
def verify_submission
# Add logic to check for successful submission message or other indicators
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! :)
@daniel-sussman good stuff. I left a comment for improvement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
# file = File.open(screenshot_path) | ||
# job_app = job_application | ||
# job_app.screenshot.attach(io: file, filename: "screenshot-#{job_application.id}.png", content_type: 'image/png') | ||
def doc_tmp_file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one to go into more detail on later with JB on how we want to handle files - he was discussing markdown for cover letters for example
end | ||
end | ||
|
||
def handle_upload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nicely organised code
find(:css, "input[type='text']", focused: true).set(follow_up_value) | ||
end | ||
|
||
def handle_demographic_question |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice custom logic - one to iterate on over time and see if we can improve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flag on Greenhouse - sometimes there's a security confirmation field that pops up (it sits hidden in the HTML) - think we will likely need to add this in due course
No description provided.