Take screenshot even if the test case get passed


I am using selenium webdriver and rspec so when a test case fail a
screenshot is taken. But is there any way to take a screenshot for all
test cases so even when the test case pass?

Thanks in advance!

I found the solution! driver.save_screenshot(./screenshot.png)