1
0
Fork 0

Render screenshots in Selenium WebDriver

This commit is contained in:
Alex Kotov 2018-12-13 05:19:46 +05:00
parent 54cd0d23ad
commit 58acf18973
No known key found for this signature in database
GPG key ID: 4E831250F47DE154

View file

@ -16,6 +16,10 @@ require 'capybara-screenshot/cucumber'
Capybara.default_driver = :rack_test Capybara.default_driver = :rack_test
Capybara.javascript_driver = :selenium_headless Capybara.javascript_driver = :selenium_headless
Capybara::Screenshot.register_driver :selenium_headless do |driver, path|
driver.browser.save_screenshot path
end
# Capybara defaults to CSS3 selectors rather than XPath. # Capybara defaults to CSS3 selectors rather than XPath.
# If you'd prefer to use XPath, just uncomment this line and adjust any # If you'd prefer to use XPath, just uncomment this line and adjust any
# selectors in your step definitions to use the XPath syntax. # selectors in your step definitions to use the XPath syntax.