Skip to content

Conversation

@odlp
Copy link
Contributor

@odlp odlp commented May 11, 2022

This PR allows a custom save_path option to be configured, instead of defaulting to the Capybara.save_path.

The motivation is wanting to specify an ephemeral directory for downloads (PDFs, CSVs etc) which is cleared between tests, but keep other items saved to the Capybara.save_path (like screenshots) as CI artifacts.

Allows paths other than Capybara.save_path to be specified
@screen_size ||= DEFAULT_MAXIMIZE_SCREEN_SIZE

@options[:save_path] = Capybara.save_path.to_s if Capybara.save_path
@options[:save_path] ||= Capybara.save_path.to_s if Capybara.save_path
Copy link

Choose a reason for hiding this comment

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

Don't know if you thought about it but I would have liked the option to be called download_path, maybe also rename it in ferrum. Probably a decisions for @route

@singhprd
Copy link
Contributor

I've superseded this PR here (just rebasing against 0.14.3):
#217

@odlp odlp closed this Nov 15, 2022
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.

3 participants