Skip to content

Conversation

@OutlawAndy
Copy link
Member

@OutlawAndy OutlawAndy commented Jan 22, 2026

Why

While recent versions of Capybara seem to use tmp/capybara as the directory where they store screenshots, the Rails tmp:clear command will not clear this directory. For that reason, I prefer to configure capybara to save failure screenshots into the traditional directory which rails expects:

Capybara.configure do |config|
  config.test_id = 'data-testid'
  config.automatic_label_click = true
  config.save_path = './tmp/screenshots'
end

Disclaimer

Ultimately, I just want to able to both use rails tmp:clear to delete local capybara artifacts & also have them accessible to me via download when CI fails. We could accomplish this a number of ways, so feel to propose another if you prefer.

Changes

  • Add input for failure-screenshot-dir with default value set to tmp/capybara
  • pass this input as the input into actions/upload-artifact

Screenshots

Code 01 22 2026@10 32 08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants