Render screenshots in Selenium WebDriver
This commit is contained in:
parent
54cd0d23ad
commit
58acf18973
1 changed files with 4 additions and 0 deletions
|
@ -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.
|
||||||
|
|
Reference in a new issue