What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Use the Ferrum gem to control Chrome or Chromium from Ruby, navigate to a webpage, and save its screenshot as a PNG. Ferrum’s default screenshot format is PNG, so the basic workflow is short: install the gem, make a browser available, capture the page, and close the browser.
Capture a webpage as PNG with Ferrum
For a standalone Ruby script, Ferrum is the direct route. It controls Chrome or Chromium and runs headless by default. The following example saves the current viewport to page.png:
require "ferrum"
browser = Ferrum::Browser.new
browser.go_to("https://example.com")
browser.screenshot(path: "page.png")
browser.quit
Replace https://example.com with the page you want to capture. The path: option writes the image to disk; because PNG is the documented default format, the .png filename matches the output format. The example follows Ferrum’s documented navigate, capture, and quit pattern.
This captures the browser’s current viewport, not automatically the entire document. If the page needs to load content or reach a particular state before capture, arrange for that state before calling screenshot. There is no single readiness wait that is right for every site or application, so the correct condition depends on what you need visible.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problems#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Install the Ruby gem and browser runtime
Ferrum is a Ruby interface to a browser, not a browser bundled into the gem. You need Ruby, the ferrum gem, and a Chrome or Chromium binary available to Ferrum.
-
Add Ferrum to your project’s
Gemfile:gem "ferrum" -
Install project dependencies:
bundle install -
Install Chrome or Chromium using the official instructions for your operating system or deployment environment.
-
Make sure the browser binary is discoverable on
PATHor throughBROWSER_PATH. Ferrum also accepts a browser path option if you need to specify a location directly.
Once the runtime is in place, run the Ruby script from the project environment where the gem was installed. If browser startup fails, first check that the binary exists in the environment actually running Ruby; a browser installed on your workstation is not automatically available inside a container or remote server.
Choose viewport, full-page, or cropped capture
Decide what the image should contain before selecting screenshot options. Ferrum’s screenshot API supports the current viewport, full-page output, a selector-based element crop, or a coordinate rectangle.
Capture the full document
Pass full: true to request a full-page screenshot:
browser.screenshot(path: "full-page.png", full: true)
Without full: true, capture remains the current viewport. Full-page mode is not a crop mode: Ferrum documents that it ignores both selector: and area:. If you need only one section of a long page, use an element or coordinate crop without full: true.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Capture an element
Use selector: when the desired output is a page element identified by a CSS selector:
browser.screenshot(path: "article.png", selector: "main article")
Selector capture takes precedence over an area: rectangle when both are supplied. Use a selector that identifies the specific element you intend to save.
Capture a coordinate rectangle
Use area: for a rectangle defined by its position and dimensions:
browser.screenshot(
path: "crop.png",
area: { x: 0, y: 0, width: 800, height: 600 }
)
The values describe an 800-by-600 region starting at coordinate (0, 0). Do not combine this with full: true expecting a crop: full-page mode ignores the rectangle.
Other documented output controls
The screenshot API also documents scale: and background_color:. Use them when the image needs scaling or a chosen background. Ferrum can return encoded image data when no path: is supplied; its documented default return is encoded data. For a file on disk, provide a path as in the examples above.
Make captures consistent and clean up
-
Set a predictable viewport. The viewport affects the page layout and therefore the resulting image. Ferrum exposes viewport information, and Cuprite’s driver configuration accepts a window size. Choose dimensions that match the output you need.
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 →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.Rank #3
SaleAnker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
-
Capture at the right page state. A screenshot taken before the relevant content appears can be technically successful but visually incomplete. Wait for an application-specific condition when the page has asynchronous content; do not assume one universal wait rule works for every site.
-
Pick one capture mode deliberately. Use viewport mode for what is currently visible,
full: truefor the document,selector:for an element, orarea:for coordinates. Full-page capture and crop options do not combine as a user might expect. -
Quit the browser. Call
browser.quitafter capture so the browser process does not linger. For scripts that may raise errors between startup and completion, ensure your application’s cleanup path still closes the browser.
Use Cuprite for an existing Capybara suite
If the screenshot belongs inside an existing Capybara JavaScript test suite, Cuprite is a relevant alternative to a standalone Ferrum script. Cuprite is a pure Ruby Capybara driver built on Ferrum. A minimal registration with a fixed window size looks like this:
Free tools Windows power users keep installed
One-click scans. No signup required.
require "capybara/cuprite"
Capybara.javascript_driver = :cuprite
Capybara.register_driver(:cuprite) do |app|
Capybara::Cuprite::Driver.new(app, window_size: [1200, 800])
end
That setup selects Cuprite as the JavaScript driver and sets the browser window to 1200 by 800. Cuprite also documents page.driver.render_base64(format, options) for Base64 screenshot output. For driver-specific rendering options, check Cuprite’s documentation rather than assuming every Ferrum browser method maps identically through Capybara.
Docker and browser sandboxing
Cuprite’s README includes a no-sandbox browser option in its Docker setup example. Treat that as deployment-specific guidance, not a setting to copy blindly into every environment. Check the browser and container requirements for the environment you deploy to, and verify any security trade-off before enabling it.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Troubleshoot common Ruby screenshot problems
Ferrum cannot find or start Chrome
Likely cause: Chrome or Chromium is not installed in the running environment, or Ferrum cannot locate its binary.
What to check: Confirm the binary is available on PATH or set BROWSER_PATH. If using a custom installation location, use Ferrum’s browser path option. In containers, verify the browser exists inside the container rather than only on the host.
The PNG shows only part of the page
Likely cause: The default capture is the viewport.
Fix: Use full: true if you need the full document. If you want one region instead, use selector: or area: without full-page mode.
The output is not the crop you expected
Likely cause: Full-page mode ignores selector and area crops, or both crop options were supplied.
Fix: Choose one intended mode. Use an element selector for a DOM element; use a coordinate area for a fixed rectangle. Selector takes precedence over area.
The file does not appear where expected
Likely cause: The script is writing relative to a different working directory, or the screenshot call did not receive a path.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Fix: Supply an explicit output path and check the working directory of the Ruby process. If you omit path:, the API returns encoded image data instead of writing a file.
The capture is blank or misses dynamic content
Likely cause: Capture occurred before the page reached the state you wanted to preserve.
Fix: Make the capture depend on a page-specific readiness condition, such as the element or content your own application expects. No universal readiness wait is established for all sites; a fixed delay may be unsuitable if load times vary.
Performance, reliability, and cost considerations
Ferrum requires a real Chrome or Chromium runtime in addition to Ruby and the gem, so deployment planning must include the browser binary as well as application dependencies. Reusing the browser in a larger automation flow may avoid repeated browser startup, while a small one-shot script can keep the lifecycle simple by starting, navigating, capturing, and quitting as shown.
Screenshot reliability depends on the requested page state, viewport, and the target site’s behavior. Set dimensions intentionally when comparing captures or generating repeatable assets; distinguish a screenshot failure from a successful capture of a page that simply had not finished rendering the content you expected.
The cited Ferrum and Cuprite documentation establishes capture APIs and setup patterns, but does not establish universal capture timings, resource consumption, or a guaranteed success rate. Avoid budgeting or promising performance based on a single unmeasured run. For cost, the relevant components are the Ruby application environment and the Chrome or Chromium runtime you choose; the project materials cited here do not state Ferrum usage fees.
Or skip the browser setup
If you need a screenshot endpoint rather than managing Chrome in Ruby, ScreenshotNeo accepts one GET request with a URL and returns a PNG, JPEG, WebP, or PDF. Its API supports viewport and full-page captures, selector captures, and other browser controls. See the ScreenshotNeo API documentation for parameters and response details.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
This cURL example saves the response to shot.webp; use your API key in place of YOUR_API_KEY. ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before the shot. Bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots, and the Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Frequently Asked Questions
Can Ferrum save a screenshot without writing a file?
Yes. If you omit the path: option, Ferrum returns encoded image data by default.
Can I take a screenshot from a Capybara test?
Yes. Cuprite is a Capybara driver built on Ferrum; register it as the JavaScript driver and use its driver-specific screenshot API.
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.

