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
1 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,10 @@ require 'capybara-screenshot/cucumber'
Capybara.default_driver = :rack_test
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.
# If you'd prefer to use XPath, just uncomment this line and adjust any
# selectors in your step definitions to use the XPath syntax.