I a trying to learn capturing screenshots in selenium. Came to know about aShot() and Shutterbug classes which is a third party Api for webdriver.
What are the key Differences and Which has Advantages
Thanks in Advance
I a trying to learn capturing screenshots in selenium. Came to know about aShot() and Shutterbug classes which is a third party Api for webdriver.
What are the key Differences and Which has Advantages
Thanks in Advance
ashot is a WebDriver screenshot utility to take screenshots, crop, prettify, compare. It can be used for the following purposes:
Maven dependency:
<dependency>
<groupId>ru.yandex.qatools.ashot</groupId>
<artifactId>ashot</artifactId>
<version>1.5.2</version>
</dependency>
You can find a couple of detailed relevant discussions in:
selenium-shutterbug is a utility library written in Java for making screenshots using Selenium WebDriver and further customizing, comparing and processing them with the help of Java AWT.
Maven dependency:
<dependency>
<groupId>com.assertthat</groupId>
<artifactId>selenium-shutterbug</artifactId>
<version>x.x</version>
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
</exclusions>
</dependency>
Using Gradle:
compile ('com.assertthat:selenium-shutterbug:x.x') {
exclude group: "org.seleniumhq.selenium", name: "selenium-java"
}
Using SBT:
"com.assertthat" % "selenium-shutterbug" % "x.x" exclude("org.seleniumhq.selenium", "selenium-java"),
You can find a couple of relevant discussions in:
The big difference between them is, ashot works only when the webpage supports jquery.
Ashot() source
Ashot() is a third party utility supported by Selenium WebDriver to capture the screen shots. The below are the features supported by aShot() utility with repect to screenshots:
Capturing the entire page Capture the Web Element Prettifying the screenshot Screenshot comparison Several elements comparison
Our focus here is on capturing the entire page and capturing the web element screenshots.
Shutterstock source Not sure whether its a tool to capture screenshots in selenium
Shutterstock is an American provider of stock photography, stock footage, stock music, and editing tools;
If you want to perform some other things like Capturing the entire page
, Screenshot comparison
etc. as mentioned above. Need some third part libraries. aShot
is one of them.
Other then this we can simply capture only visible part screenshot using TakesScreenshot interface in Selenium.