AShot is a Java screenshot library that runs on top of Selenium WebDriver. It can capture a viewport or a viewport-pasted full page, crop a screenshot to a WebElement, and compare images. Allure is a separate reporting system: you pass the image produced by AShot to your test framework’s Allure attachment API.
This guide shows the complete implementation, explains coordinate providers and shooting strategies, and highlights an important maintenance warning: AShot’s release information is old and inconsistent. Verify the artifact and resolved Selenium dependencies in your own build before adopting it.
What AShot does—and what Allure does not do
AShot is not an Allure module. The AShot project describes a WebDriver utility for taking screenshots, cropping and decorating them, and finding image differences. Selenium drives the browser; AShot processes the captured pixels; Allure displays an attachment produced by your test framework.
If you only need the currently visible browser viewport, Selenium’s native TakesScreenshot interface may be enough. AShot becomes useful when you need its viewport-pasting full-page strategy, element cropping, coordinate-provider alternatives, or image-difference tools. Either image source still requires the Allure adapter for your test framework.
#1 Best Overall
- Compatible with Nintendo Switch 2’s new GameChat mode
- Auto-Light Balance: RightLight boosts brightness by up to 50%, reducing shadows so you look your best—compared to previous-generation Logitech webcams (1)
- Privacy with a Slide: The integrated webcam cover makes it easy to get total, reliable privacy when you're not on a video call
- Built-In Mic: The built-in microphone lets others hear you clearly during video calls
- Easy Plug-And-Play: The Brio 101 works with most video calling platforms, including Microsoft Teams, Zoom and Google Meet—no hassle; it just works
Check the dependency before adding it
The AShot README shows this Maven coordinate:
<dependency>
<groupId>ru.yandex.qatools.ashot</groupId>
<artifactId>ashot</artifactId>
<version>1.5.4</version>
</dependency>
There is a version-history mismatch. The project’s release panel lists 1.5.2, dated December 9, 2015, as its latest release, while the README and Maven Central list 1.5.4. Maven Central’s 1.5.4 metadata also lists selenium-remote-driver 2.53.0. Treat these as historical artifacts, not evidence of current browser support.
- Add the dependency only after checking your repository and build policy.
- Run
mvn dependency:tree(or the equivalent Gradle dependency report). - Inspect Selenium transitive versions and resolve conflicts deliberately rather than silently downgrading the Selenium version used by your tests.
- Run a smoke test with the exact browser, driver, operating system, Selenium version, and device-pixel ratio used in CI.
Capture a full page with viewport pasting
For a driver that returns only the visible viewport, AShot’s documented pattern is:
import ru.yandex.qatools.ashot.AShot;
import ru.yandex.qatools.ashot.Screenshot;
import ru.yandex.qatools.ashot.shooting.ShootingStrategies;
Screenshot screenshot = new AShot()
.shootingStrategy(ShootingStrategies.viewportPasting(100))
.takeScreenshot(driver);
viewportPasting(100) selects a strategy that repeatedly scrolls the page, captures viewport images, and pastes them into one larger image. The numeric argument is part of the AShot API examples; confirm its timing behavior against the version resolved by your build instead of assuming that it has the same meaning in a fork or replacement.
AShot allows strategies to be composed and custom strategies to be written. That matters for pages with sticky headers, unusual scroll containers, animations, or browser-specific screenshot behavior. A full-page result is not automatically equivalent to a browser’s native full-page screenshot: it is assembled from multiple viewport captures, so moving content can appear duplicated or shifted.
Write the resulting image
import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;
BufferedImage image = screenshot.getImage();
ImageIO.write(image, "PNG", new File("target/page.png"));
The format passed to ImageIO.write must match the intended file type and extension. This file operation is ordinary Java code; AShot does not publish it to Allure automatically.
Capture one WebElement
Locate the element with Selenium and pass it to AShot:
Rank #2
- Compatible with Nintendo Switch 2’s new GameChat mode
- Crisp HD 720p/30 fps video calls with diagonal 55° field of view and auto light correction. Compatible with popular platforms including Skype and Zoom.
- The built-in noise-reducing mic makes sure your voice comes across clearly up to 1.5 meters away, even if you’re in busy surroundings.
- C270’s RightLight 2 feature adjusts to lighting conditions, producing brighter, contrasted images to help you look good in all your conference calls.
- The adjustable universal clip lets you attach the camera securely to your screen or laptop, or fold the clip and set the webcam on a shelf. You’re always ready for your next video call.
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import ru.yandex.qatools.ashot.AShot;
import ru.yandex.qatools.ashot.Screenshot;
WebElement element = driver.findElement(By.cssSelector("#my_element"));
Screenshot screenshot = new AShot().takeScreenshot(driver, element);
ImageIO.write(screenshot.getImage(), "PNG", new File("target/element.png"));
AShot calculates the element’s coordinates and crops the captured image. Wait until the element is displayed and stable before capturing; a zero-size, transitioning, or covered element can produce an unexpected crop.
Use the WebDriver coordinate provider when JavaScript is a problem
The project says its default coordinate approach uses jQuery. If JavaScript execution or the page’s script environment causes incorrect coordinates, use the WebDriver API provider:
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallimport ru.yandex.qatools.ashot.coordinates.WebDriverCoordsProvider;
Screenshot screenshot = new AShot()
.coordsProvider(new WebDriverCoordsProvider())
.takeScreenshot(driver, element);
This is an alternative coordinate calculation path, not a guarantee that every browser layout issue disappears. Test it with the page and driver combination that matters to you.
Attach an AShot image to an Allure report
Capture and attachment are separate operations. The current official Allure Selenium guidance demonstrates Selenium’s TakesScreenshot and framework-specific attachment setup, but it does not establish an AShot-specific adapter. Use the image bytes or file produced by AShot with the current Allure adapter for your test framework, and verify the adapter’s method name and MIME-type requirements.
For example, the integration concept is:
- Capture an AShot
Screenshot. - Convert
screenshot.getImage()to PNG bytes or write a PNG file. - Call your framework’s Allure attachment method with the bytes, a descriptive name, and an image MIME type such as
image/png.
Do not assume that importing an AShot class creates an Allure result. If the attachment does not appear, inspect the test adapter configuration and the generated Allure results directory independently of the screenshot code.
Rank #3
- 【Full HD 1080P Webcam】Powered by a 1080p FHD two-MP CMOS, the NexiGo N60 Webcam produces exceptionally sharp and clear videos at resolutions up to 1920 x 1080 with 30fps. The 3.6mm glass lens provides a crisp image at fixed distances and is optimized between 19.6 inches to 13 feet, making it ideal for almost any indoor use.
- 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 8, 10 & 11 / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
- 【Built-in Noise-Cancelling Microphone】The built-in noise-canceling microphone reduces ambient noise to enhance the sound quality of your video. Great for Zoom / Facetime / Video Calling / OBS / Twitch / Facebook / YouTube / Conferencing / Gaming / Streaming / Recording / Online School.
- 【USB Webcam with Privacy Protection Cover】The privacy cover blocks the lens when the webcam is not in use. It's perfect to help provide security and peace of mind to anyone, from individuals to large companies. 【Note:】Please contact our support for firmware update if you have noticed any audio delays.
- 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 10 & 11, Pro / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
Compare screenshots and mark differences
AShot includes an ImageDiffer workflow:
import ru.yandex.qatools.ashot.comparison.ImageDiffer;
import ru.yandex.qatools.ashot.comparison.ImageDiff;
ImageDiff diff = new ImageDiffer().makeDiff(baseline, actual);
BufferedImage marked = diff.getMarkedImage();
ImageIO.write(marked, "PNG", new File("target/diff.png"));
The project also documents excluding selected WebElements and ignoring pixels of a configured color. Use those controls narrowly: masking a dynamic clock or advertisement can reduce noise, but broad exclusions can hide a real regression.
Recommended Free Tools
- Freeze data and animations before capture.
- Use the same viewport, fonts, operating system, browser build, and device-pixel ratio for baseline and actual images.
- Wait for network activity and lazy images to finish.
- Decide whether anti-aliasing and subpixel differences should count as failures.
Why a screenshot may contain only the upper-left corner
The symptom “only the upper-left corner of the visible window” usually indicates a coordinate, scaling, or crop mismatch rather than an Allure problem.
Retina and device-pixel-ratio scaling
A 2017 AShot issue discusses a Retina/device-pixel-ratio-2 case in which the project owner pointed to viewportRetina. If your logical CSS dimensions and screenshot bitmap dimensions differ, test the Retina-specific strategy or provider available in your resolved AShot version and verify the resulting image dimensions.
Driver and browser changes
A 2020 issue reports full-page clipping on Chrome 80. That historical report does not predict behavior in every current Chrome release, but it demonstrates why a local smoke test is essential. Check the browser-driver pair, scroll height, fixed-position elements, and whether the page uses an inner scrolling container instead of the document.
JavaScript coordinate failures
Switch from the default coordinate calculation to WebDriverCoordsProvider when JavaScript execution is unavailable or returns unreliable coordinates. Also ensure the element is in view and not inside an iframe that you have not switched into.
Rank #4
- 1080P Webcam with Cover for Video Calls - EMEET computer webcam provides design and Optimization for professional video streaming. Realistic 1920 x 1080p video, 5-layer anti-glare lens, providing smooth video. C960 computer camera delivers 1920x1080 video with fixed focus (11.8–118.1 inches), so as to provide a clearer image. C960 USB webcam has a cover and can be removed automatically to meet your needs for privacy. For optimal image performance, use the webcam in a well-lit environment.
- Built-in 2 Omnidirectional Mics - EMEET webcam with microphone for desktop features 2 built-in omnidirectional microphones, picking up your voice to create clear audio for communication. When installing the webcam, select EMEET C960 as the default microphone input device in your computer and video applications and select C960 as the default device in Zoom/Teams and ensure microphone permissions are enabled for proper use. Please note that C960 does not include built-in speakers.
- Automatic Light Adjustment - Automatic exposure adjustment is applied in EMEET HD webcam 1080p so that the streaming webcam can deliver stable image performance. EMEET C960 camera for computer also features color adjustment and exposure optimization to help you look your best. For optimal video quality, it is recommended to use the webcam in normal or well-lit environments and select suitable video settings in your application. Proper lighting helps achieve a clearer and more balanced image.
- Plug-and-Play & Upgraded USB Connectivity - New C960 webcam features both USB Type-A & A-to-C adapter connections for wider compatibility. For stable performance, connect the webcam directly to the computer's main USB port and ensure the device is recognized correctly. If a hub or docking station is used, please ensure it provides sufficient power and stable data transmission, as limited ports may affect performance. 90° wide-angle lens captures more participants without frequent adjustments.
- High Compatibility & Multi Application - C960 webcam for laptop is compatible with Windows 10/11, macOS 10.14+, and Android TV 7.0+. Not supported: Windows Hello, TVs, tablets, or game consoles. It works with Zoom, Teams, Facetime, Google Meet, YouTube and more. Please select C960 webcam as the default camera and microphone device in your application and ensure camera/microphone permissions are enabled, especially on macOS. (Tips: Incompatible with Windows Hello)
Compatibility and maintenance decisions
| Requirement | Native Selenium screenshot | AShot |
|---|---|---|
| Visible viewport | TakesScreenshot is usually sufficient. |
Works, but adds a dependency. |
| Viewport-pasted full page | Not the focus of the native interface. | Provided by viewportPasting and related strategies. |
| Element crop | Requires your own crop logic or browser support. | takeScreenshot(driver, element) calculates and crops. |
| Image comparison | Requires another comparison library. | Includes ImageDiffer, marked images, and ignore/exclusion options. |
| Dependency maintenance | No additional AShot artifact. | Release history is old; 1.5.4 metadata includes Selenium 2.x-era dependencies. |
| Allure reporting | Still needs the test framework’s Allure attachment integration. | Still needs the same integration; AShot is not an Allure adapter. |
Choose AShot when its full-page, crop, or comparison behavior solves a concrete requirement and your compatibility test passes. Choose native Selenium when a viewport image and a maintained dependency surface are the priority.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Practical troubleshooting checklist
Dependency resolution fails
- Cause: the artifact is unavailable in the configured repository or the version signal is inconsistent.
- Fix: verify
ru.yandex.qatools.ashot:ashot:1.5.4in your repository, inspect the resolved tree, and do not assume the GitHub release label and artifact version are interchangeable.
Images are clipped or duplicated
- Cause: viewport pasting depends on scroll timing, document layout, fixed headers, and driver behavior.
- Fix: wait for layout stability, test the strategy’s delay for your version, hide or account for sticky elements, and run the capture against the exact CI browser.
Element crop is offset
- Cause: JavaScript coordinate calculation, device-pixel-ratio scaling, frames, or browser zoom.
- Fix: try
WebDriverCoordsProvider, switch into the correct frame, reset zoom, and compare CSS dimensions with bitmap dimensions.
The image is correct but absent from Allure
- Cause: capture succeeded, but no attachment was written or the adapter was called with the wrong MIME type.
- Fix: open the PNG independently, inspect the generated Allure results directory, and follow the current adapter documentation for your JUnit, TestNG, or other framework.
Pixel comparisons fail intermittently
- Cause: dynamic data, fonts, animation, lazy loading, or rendering differences.
- Fix: stabilize content and environment first; then use narrowly scoped ignored regions or color exclusions.
Or skip the browser setup
If your requirement is simply to obtain a clean screenshot from a URL, ScreenshotNeo provides a website screenshot API and MCP server. A single request returns PNG, JPEG, WebP, or PDF:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for the complete option set. Before capture, it can accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.
The free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every plan includes all features. Create a free ScreenshotNeo account.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →FAQ
Is AShot maintained as a current Allure component?
No. AShot is a separate Selenium utility, and its listed release history is dated. Treat compatibility as something to verify in your own environment.
Can AShot capture a PDF?
The documented AShot workflow in this guide returns raster screenshots. PDF generation is a separate browser or service capability.
Best Value
- Compatible with Nintendo Switch 2’s new GameChat mode
- HD lighting adjustment and autofocus: The Logitech webcam automatically fine-tunes the lighting, producing bright, razor-sharp images even in low-light settings. This makes it a great webcam for streaming and an ideal web camera for laptop use
- Advanced capture software: Easily create and share video content with this Logitech camera that is suitable for use as a desktop computer camera or a monitor webcam
- Stereo audio with dual mics: Capture natural sound during calls and recorded videos with this 1080p webcam, great as a video conference camera or a computer webcam
- Full HD 1080p video calling and recording at 30 fps. You'll make a strong impression with this PC webcam that features crisp, clearly detailed, and vibrantly colored video
Does full-page capture work inside a scrollable div?
Not automatically in every layout. Viewport-pasting is oriented around scrolling and assembling page captures; an inner scrolling container may require custom handling or a different strategy.
Frequently Asked Questions
Should I use AShot for every Selenium screenshot?
No. Use native Selenium for a straightforward viewport capture; add AShot when you specifically need its full-page pasting, element cropping, or comparison features and your compatibility smoke test passes.
Why does an Allure report show no screenshot even though AShot created a file?
AShot only creates or returns the image. Your test framework must attach that image through its current Allure integration, with the correct bytes, name, and MIME type.
What should I test before upgrading Chrome or Selenium?
Run full-page and element captures on the exact browser-driver pair, operating system, device-pixel ratio, and dependency tree used in CI, then inspect dimensions and representative crops.
The Bottom Line
AShot can still be useful for Selenium full-page assembly, element crops, and image differences, but it is an old, separate library rather than an Allure feature. Verify dependency resolution and browser behavior locally, and attach its output through your framework’s current Allure adapter.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.

