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

Not a bug but rather a question on blank screenshots #266

Open
nerrante opened this issue Oct 15, 2019 · 1 comment
Open

Not a bug but rather a question on blank screenshots #266

nerrante opened this issue Oct 15, 2019 · 1 comment

Comments

@nerrante
Copy link

nerrante commented Oct 15, 2019

I am running Cucumber ruby with Capybara and the capybara-screenshot gem. Everything was working fine until I added a driver.close call to the After scenario hook. Now my screenshots are blank. I know that it is because it is closing the driver FIRST and then taking the screenshot. What I don't know is how to fix that - how can I get cucumber to do the driver closing last (but still after each scenario)?

@BrianHawley
Copy link

Try different ordering for your After hook and the require 'capybara-screenshot/cucumber' call in the support file where you have that code. The env.rb and env_changes.rb files are run first, so if you are doing any order-dependent operations then you probably need to put them in the env_changes.rb file. Try putting the After block first, then the require, and see if that works; if not, try the other way.

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

No branches or pull requests

2 participants