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

08/07/24 form filler #214

Merged
merged 15 commits into from
Jul 22, 2024
Merged

08/07/24 form filler #214

merged 15 commits into from
Jul 22, 2024

Conversation

daniel-sussman
Copy link
Collaborator

No description provided.

@daniel-sussman daniel-sussman marked this pull request as draft July 9, 2024 10:01
Comment on lines 28 to 37
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
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks! :)

@patanj101
Copy link
Collaborator

@daniel-sussman good stuff. I left a comment for improvement.

@patanj101 patanj101 marked this pull request as ready for review July 9, 2024 11:58
Copy link
Owner

@Ches-ctrl Ches-ctrl left a 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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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

Copy link
Owner

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

@daniel-sussman daniel-sussman merged commit 51230fc into main Jul 22, 2024
7 checks passed
@daniel-sussman daniel-sussman deleted the 08/07/24_form_filler branch July 22, 2024 09:11
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.

None yet

3 participants