Cucumber-Capybara: save_screenshot(path, full: true) is not capturing the full browser? -


i'm using latest chrome browser, version 57.0.2987.133 (64-bit), latest chromedriver v2.29 (although i've tried chrome 56 , chromedriver 2.27 well) , i've got problem not able capture full browser when test fails.

this code i've got on env.rb file:

capybara::screenshot.register_driver(:chrome) |driver, path|   driver.browser.save_screenshot(path, full: true) end 

however, screenshots getting partial part, can see on screen rather complete browser.

any idea if i'm doing wrong or if can try different?

thank you!

since you're using chrome, assume you're using selenium driver (selenium-webdriver). selenium driver doesn't support options being passed save_screenshot, , passing options page.driver.screenshot -https://github.com/seleniumhq/selenium/blob/master/rb/lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb#l34 - raise many arguments error (which in case assume capybara_screenshot gem catches , ignores) , not save screenshot. if instead call driver.save_screenshot(path, full: true) take shot, options passed ignored since aren't supported. additionally, since webdriver spec defined taking shot of viewport (visible window), not expect selenium support full screen shots time soon.

if using selenium screenshots , want larger option increase window size before taking screenshot.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -