If you're running your testing in CI through Github Actions and want to access the screenshots of the failed attempts, here's what you do. This assumes your tests are already set up to run in github actions
Look at the the failed test logs in the Github action
Capybara Example: /home/runner/work/company/company/tmp/capybara/
Capybara::ElementNotFound:
Unable to find css "[role=\"unlock-button\"]"
[Screenshot Image]: /home/runner/work/company/company/tmp/capybara/screenshots/failures_r_spec_example_groups_conflicts_of_interest_module_logged_in_conflicts_of_interest_table_with_records_can_finalize_conflicts_twice_716.png
- name: Run tests
run: bundle exec rspec --pattern "spec/system/**/*_spec.rb"
- name: Upload Artifacts
if: failure()
uses: actions/upload-artifact@v2
with:
name: screenshots
path: /home/runner/work/themis/themis/tmp/capybara/screenshots/*
if:failure()
both makes sure that it only uploads the folder if there were test failures, and makes sure the failure doesn't skip the Upload Artifacts
step
NOTE: There isn't a way to get github actions to upload individual file artifacts instead of a zip file