I want to capture full webpage screenshot in chrome browser using ruby selenium. I am using Rspec testing framework. save_screenshot<\/code> method captures screenshot only for visible area.
I have gone through the following link,
Is there any other way or gem to achieve same.
1) You can use https://github.com/samnissen/watir-screenshot-stitch where
2) or use native instrument for your OS - https://paulhammond.org/webkit2png
In code will look like thiswebkit2png https://stackoverflow.com/questions/60728482/can-anyone-suggest-how-to-take-screenshot-of-full-webpage-using-ruby-selenium
where:
- main command - webkit2png
- link page - all else
It's old question, but it doesn't hurt to post this. Use Scrot to take screenshot, and later make gif. Since OP only want screenshots, command would be:
require 'screenscrot'
@screen = ScreenScrot.new
@screen.capture(:all)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.