instance method
take_failed_screenshot
Ruby on Rails 7.0.10
Since v5.2.8.1Signature
take_failed_screenshot()
Takes a screenshot of the current page in the browser if the test failed.
take_failed_screenshot is called during system test teardown.
Source
# File actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb, line 44
def take_failed_screenshot
take_screenshot if failed? && supports_screenshot? && Capybara::Session.instance_created?
end
Defined in actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb line 44
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::SystemTesting::TestHelpers::ScreenshotHelper