In this
Blog, we are going to learn how we can capture screenshot of a web page using Selenium Shutterbug.
Before
Moving further let's understand what is Shutterbug and why it is required.
Selenium
Shutterbug is a utility library written in Java for taking screenshots using Selenium
Web Driver and further customizing,
comparing and processing them.
With Shutterbug, we can also capture screenshot of particular web element, highlight them, screenshot comparison etc.
Please visit the official GitHub Page of Shutterbug for more details.
To Start
with Shutterbug we need to add below maven dependency or Jar. You can also
download them from the Maven Repository using the link.
Below is the
detailed code snippet for capturing screenshot of Google homepage and storing
it in a local machine.
In the above
code shoot page is a method that captures the screenshot. withName method
assigns the desired name to screenshot take by shootpage method and Save method
creates a new folder with folder name as “screenshots” and saves
screenshot in that folder.
Capturing Screenshot Using Selenium Shutterbug - Qa Automation >>>>> Download Now
Reply>>>>> Download Full
Capturing Screenshot Using Selenium Shutterbug - Qa Automation >>>>> Download LINK
>>>>> Download Now
Capturing Screenshot Using Selenium Shutterbug - Qa Automation >>>>> Download Full
>>>>> Download LINK TM