Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set the page’s direction to right-to-left before capturing it, then use Playwright’s page.screenshot(). For a site you control, put dir="rtl" on the document’s <html> element and set an appropriate lang value. For a test of a page you do not control, you can set the document root’s dir property after navigation—but that does not guarantee the site’s layout will reflow correctly.

Set the page to RTL before capturing it

Direction is part of the page state you want to capture. For a page predominantly written in Arabic, Hebrew, or another right-to-left script, set direction semantically on the document root:

<html dir="rtl" lang="ar">

Use the language value that matches the actual content; ar is just an example. The dir attribute sets direction. The lang attribute identifies the language; it does not set direction by itself.

Prefer setting these attributes in the application when RTL is a real page mode. This lets the site render from its intended initial state. Direction alone does not guarantee that every layout detail will be correct: CSS, component styles, embedded content, and assumptions in the application can all affect the result.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Logitech Brio 101 Full HD 1080p Webcam for Streaming and Meetings - Black
  • 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

Apply RTL in a test without changing the site

For a test-only capture, navigate first and then set the root direction before taking the screenshot:

await page.goto('https://example.com');
await page.evaluate(() => {
  document.documentElement.dir = 'rtl';
});
await page.screenshot({ path: 'rtl-page.png' });

This changes the document’s direction attribute, but it may not reproduce the site’s actual RTL mode. The site may apply direction through its own settings or CSS, or have layout rules that do not adapt when direction changes after load. If the application has a real RTL mode, use that mode for a representative screenshot.

Capture a viewport or the full page

Here is a complete JavaScript example using Playwright’s Chromium browser. Replace the example URL with the page you need to capture. The code sets RTL on the document root after navigation, saves a viewport image, then saves a separate image of the full scrollable page.

Rank #2
Sale
Logitech C270 720p Webcam Plug-and-Play Wide Screen Video Calling - Black
  • 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 { chromium } from 'playwright';

const browser = await chromium.launch();

try {
  const page = await browser.newPage();
  await page.goto('https://example.com');

  await page.evaluate(() => {
    document.documentElement.dir = 'rtl';
  });

  // The default page screenshot captures the current viewport.
  await page.screenshot({ path: 'rtl-page.png' });

  // Capture the full scrollable document in a separate image.
  await page.screenshot({
    path: 'rtl-page-full.png',
    fullPage: true
  });
} finally {
  await browser.close();
}

If the application controls the document markup, set dir="rtl" and the correct lang value there, then remove the page.evaluate() step. The screenshot calls stay the same.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the capture scope that matches your need

  • Viewport: page.screenshot({ path: 'rtl-page.png' }) captures the visible viewport by default.
  • Full page: add fullPage: true to capture the full scrollable page as one tall image.
  • One element: use a locator’s screenshot method when you need a focused component rather than the whole page.

Capture one RTL element

Use a locator screenshot when the artifact should contain one element, such as the main content area, rather than the viewport or full document:

await page.getByRole('main').screenshot({ path: 'rtl-main.png' });

Choose a locator that identifies the intended element on the target page. If the element is not present or the locator matches an unexpected part of the page, the result will not represent the region you meant to capture.

Rank #3
Sale
NexiGo N60 1080P Webcam with Microphone, Software Control & Privacy Cover, USB HD Computer Web Camera, Plug and Play, for Zoom/Skype/Teams, Conferencing and Video Calling
  • 【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.

Use Playwright Test for a visual baseline

For a visual regression test, Playwright Test can capture and compare a screenshot with a stored baseline. Set up the page’s actual RTL mode before the assertion; the example below injects direction for a test-only case:

import { test, expect } from '@playwright/test';

test('RTL page screenshot', async ({ page }) => {
  await page.goto('https://example.com');
  await page.evaluate(() => {
    document.documentElement.dir = 'rtl';
  });

  await expect(page).toHaveScreenshot('rtl-page.png');
});

The screenshot assertion waits for consecutive captures to stabilize before comparing. That helps with transient rendering, but does not make screenshots identical across different environments. Keep the browser, operating system, fonts, viewport, and rendering setup consistent between baseline creation and comparison. Dynamic page regions can also interfere with a visual comparison; mask or otherwise neutralize them when appropriate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep RTL screenshots useful and repeatable

Use semantic direction and the right language

Use dir="rtl" for direction and an accurate lang value for language. Setting only lang does not make a page right-to-left. For mixed-direction content, inspect the actual page: applying RTL to the root establishes the base direction, but individual content and CSS can still influence how it appears.

Rank #4
Sale
EMEET C960 1080P Webcam with Microphone, 2 Mics, 90° FOV, Computer Camera
  • 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)

Match the site state you intend to document

A screenshot with direction injected after navigation is useful for testing how a page responds to a direction change. It is not proof that the site’s complete RTL experience is correct. Where available, use the application’s own RTL mode and capture after that mode has taken effect.

Control the environment for visual comparisons

Browser version, operating system, fonts, hardware, viewport, and other rendering conditions can change screenshot output. Generate and compare visual baselines in a consistent setup. If the page contains changing content, such as a live widget, account for those regions so incidental changes do not obscure meaningful layout differences.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common RTL screenshot problems

The screenshot still looks left-to-right

  • Confirm that the document root has dir="rtl" before the screenshot call.
  • Check that you set dir, not only lang.
  • Inspect the target’s CSS and app state. CSS direction properties or page-specific layout rules may affect the result.
  • If the site has an RTL setting, use it instead of assuming that a late test-only direction change reproduces the intended layout.

The layout changes, but some components remain wrong

dir="rtl" establishes the document’s base direction and affects bidirectional text; it does not rewrite every layout decision. Inspect component styles, embedded content, and physical versus logical CSS properties. Fix the application’s RTL styling when the goal is to validate the site rather than merely produce a test image.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Logitech C920x HD Pro PC Webcam Full 1080p/30fps Video - Black
  • 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

The full-page image is much taller than expected

fullPage: true captures the full scrollable document, not just the current viewport. Use the default viewport screenshot when you need only what is currently visible, or use a locator screenshot for a particular element.

A visual test fails even though the page appears unchanged

Check whether the baseline and test use the same browser, operating system, fonts, viewport, and rendering setup. Also look for dynamic regions that change between captures. The screenshot assertion waits for consecutive captures to stabilize, but environment differences and changing page content can still affect a comparison.

Or skip the browser setup

ScreenshotNeo can return a page screenshot with one GET request. Its cleanup accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and whether the shot was billed. It also has an MCP server with screenshot, page-info, and PDF tools for AI agents.

This is an API screenshot call, not a Playwright session: use Playwright when you need to set the document’s direction or drive the site’s own RTL mode. ScreenshotNeo’s listed features include custom JavaScript, but do not assume the request below sets RTL unless you configure that behavior for your use case.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" 
  -d access_key=YOUR_API_KEY 
  --data-urlencode url=https://example.com 
  -o shot.webp

See the ScreenshotNeo API documentation for request options. The service supports PNG, JPEG, WebP, or PDF output, among other capture options. The Free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000. Learn about ScreenshotNeo or sign up for 1,000 free screenshots a month with no card.

FAQ

Does changing dir also change the page language?

No. Set lang to identify the content’s language; set dir to establish text direction.

Which Playwright screenshot method should I use for a component?

Use the locator’s screenshot() method for one element. Use page.screenshot() for the viewport or full scrollable page.

Quick Recap

SaleBestseller No. 1
Logitech Brio 101 Full HD 1080p Webcam for Streaming and Meetings - Black
Logitech Brio 101 Full HD 1080p Webcam for Streaming and Meetings - Black
Compatible with Nintendo Switch 2’s new GameChat mode; Built-In Mic: The built-in microphone lets others hear you clearly during video calls
$24.99
SaleBestseller No. 2
Logitech C270 720p Webcam Plug-and-Play Wide Screen Video Calling - Black
Logitech C270 720p Webcam Plug-and-Play Wide Screen Video Calling - Black
Compatible with Nintendo Switch 2’s new GameChat mode
$16.89
SaleBestseller No. 5
Logitech C920x HD Pro PC Webcam Full 1080p/30fps Video - Black
Logitech C920x HD Pro PC Webcam Full 1080p/30fps Video - Black
Compatible with Nintendo Switch 2’s new GameChat mode; Fully compatible with Windows 11
$54.99

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.