Short answer: you do not disable Flash with a new Sauce Labs capability today. Flash Player is retired: Adobe ended support on December 31, 2020 and blocked Flash content on January 12, 2021. Chrome no longer plays Flash in any version, and current Sauce Labs browsers cannot run it. Remove old Flash preferences, extensions, command-line switches and Flash-only assertions from your Selenium setup, then migrate the application or fixture to HTML5, JavaScript, WebGL or another supported implementation.
This guide shows how to clean a Selenium 4 session, what to do with legacy Sauce Labs pre-run scripts, how to diagnose tests that still mention Flash, and how to capture a page without maintaining a browser automation stack.
What “disable Flash” means in a current Sauce Labs run
In a modern remote Selenium session, Flash is already unavailable. Adobe’s Flash Player end-of-life date was December 31, 2020; Adobe blocked Flash content from running on January 12, 2021. Chrome documentation likewise says Flash content no longer plays in any Chrome version as of 2021. Therefore, a setting such as plugins.always_open_pdf_externally, a Flash extension, or a --enable-...flash switch is not a supported way to control a current Sauce Labs browser.
“Disable Flash” now normally means one of three cleanup tasks:
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 →#1 Best Overall
- Delete obsolete Flash plugin preferences and extensions from your browser Options object.
- Remove Flash command-line flags and capability keys copied from pre-2021 examples.
- Replace assertions, fixtures and application code that expect a Flash movie, NPAPI plugin or
.swfresource.
If a page still displays a Flash warning, the warning is application content or a stale test fixture; it is not evidence that Sauce Labs can execute Flash.
Use Selenium 4 Options and W3C capabilities
Sauce Labs sessions are created with a browser Options class plus Sauce-specific capabilities. Sauce settings belong inside sauce:options. Browser settings use vendor-prefixed keys such as goog:chromeOptions, moz:firefoxOptions and ms:edgeOptions. Selenium 4 moved away from the legacy Desired Capabilities classes.
Minimal cleanup pattern
options = BrowserOptions()
# Do not add Flash plugin preferences, Flash extensions,
# or Flash command-line flags.
sauce_options = {
"name": "flash-migration",
"build": "current"
}
options.set_capability("sauce:options", sauce_options)
driver = RemoteWebDriver(sauce_endpoint, options=options)
BrowserOptions, RemoteWebDriver and the Sauce endpoint are placeholders because the exact imports and endpoint variable differ by language and account setup. Use Sauce Labs’ current configurator and language examples when converting this pattern to production code.
Chrome example (Python)
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
# Keep only supported Chrome arguments and preferences.
# No Flash extension, plugin preference, or Flash switch.
options.set_capability("sauce:options", {
"name": "flash-migration",
"build": "current"
})
driver = webdriver.Remote(
command_executor=sauce_endpoint,
options=options
)
try:
driver.get("https://example.test")
# Assert the HTML5 replacement, not a Flash object.
finally:
driver.quit()
Firefox and Edge
Use FirefoxOptions or EdgeOptions in the same way. Keep browser-specific values in the Options object and Sauce metadata in sauce:options. Do not copy a Chrome-only Flash preference into Firefox or Edge; it will either be ignored or cause a capabilities error.
Free tools Windows power users keep installed
One-click scans. No signup required.
Remove legacy Flash settings from your codebase
Search the test repository, CI variables and fixture files for terms such as flash, Shockwave, .swf, pepflashplayer, NPAPI, plugin, enable-plugins, disable-plugins and --allow-outdated-plugins. Remove a setting only after checking whether the same line configures an unrelated plugin.
Rank #2
Common obsolete patterns
| Legacy item | Current action | Reason |
|---|---|---|
| Flash extension or Pepper Flash path | Delete it | Current browsers do not load Flash Player. |
| Chrome Flash command-line switch | Delete it | Retired switches cannot restore plugin execution. |
| Firefox Flash preference | Delete it | Modern Firefox releases removed Flash support. |
| Flash-specific wait or assertion | Rewrite for HTML5 DOM, canvas, WebGL or media APIs | The old object will never become ready. |
Fixture containing a .swf URL |
Replace the fixture or mark it as a migration test | The resource cannot execute in a current browser. |
Update assertions, not just capabilities
An assertion such as “Flash movie is visible” will fail even after capabilities are clean. Test the user-visible replacement: an HTML element, a canvas, a WebGL context, a video element, a JavaScript event or an accessible status message. If the product has no replacement yet, split the test: verify that the migration warning is shown and track the missing implementation separately.
What Sauce Labs pre-run scripts can and cannot do
Sauce Labs pre-run executables are scripts downloaded to the virtual machine and run before a test. They can configure machine or browser settings where the selected environment supports those settings. They cannot make current Chrome, Firefox or Edge execute retired Flash content.
Safe uses
- Install or configure a test dependency that is still supported by the selected image.
- Place static test data where the application can read it.
- Set environment variables or other machine-level values allowed by the Sauce Labs image.
Unsafe expectation
Do not use a pre-run script to download Flash Player, inject a plugin, or modify a browser policy in the hope of reviving Flash. Such a script adds maintenance and may fail the session before WebDriver starts, while the browser still cannot run Flash.
Migration path for Flash-dependent applications
- Inventory the dependency. Record each page, workflow,
.swfasset, ActionScript feature and external integration that still references Flash. - Choose a replacement. Typical targets are semantic HTML and CSS, JavaScript components, WebGL for graphics, or standard video and audio elements.
- Keep the old path isolated. If historical data must be tested, preserve it as a non-executing fixture or documentation test rather than making every browser session depend on Flash.
- Rewrite synchronization. Wait for a DOM selector, a network-idle condition, a JavaScript state change or an application-specific readiness marker instead of waiting for a plugin object.
- Run across the supported matrix. Select the browser families and versions your application actually supports, then remove any capability that exists only for the retired plugin.
- Delete the compatibility debt. Remove obsolete CI images, plugin downloads, environment variables and comments after the replacement tests pass.
Troubleshooting: why a test still mentions Flash
The session fails with an “unknown capability” error
Cause: a legacy key is being sent outside the W3C Options structure, or a browser-specific key is misspelled.
Fix: construct the correct Selenium 4 Options object, put Sauce metadata under sauce:options, and remove Flash keys. Inspect the capabilities logged by your client before the remote session is created.
Rank #3
The page says Flash is blocked
Cause: the application still serves a Flash detection branch or a stale fixture.
Fix: update the application’s feature detection and test data to the HTML5 implementation. Do not attempt to bypass the message with a retired browser flag.
A wait times out on a Flash object
Cause: the test waits for an object that cannot load.
Fix: wait for the replacement selector, canvas state, media event or application readiness signal. Add a diagnostic screenshot and browser console capture so the failure identifies the replacement state.
A pre-run script succeeds but the test still fails
Cause: pre-run scripts configure the VM; they do not restore Flash execution.
Rank #4
Fix: remove the script’s Flash-related steps and migrate the page or fixture. Keep only setup actions that support the current browser.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesLocal and Sauce Labs results differ
Cause: local code may be using a cached profile, an old browser image or a different application fixture.
Fix: compare browser versions, Options values, user data directories, network access and test URLs. Start with a clean local profile and a current Sauce Labs image, then verify that neither environment includes a Flash artifact.
Performance, reliability and cost considerations
Removing plugin setup generally shortens session startup and eliminates a failure point, but page performance still depends on the migrated application. Lazy-loaded images, third-party scripts and network conditions can affect Selenium timing independently of Flash.
- Use explicit waits tied to stable application state rather than fixed sleeps.
- Capture browser logs and the final DOM when a migration test fails.
- Pin a supported browser family and version in CI, and review that matrix as browsers change.
- Keep pre-run scripts small; every download is another source of timeout or image incompatibility.
- Do not pay for a legacy browser or plugin workaround that cannot execute Flash.
Or skip the browser setup
If your goal is a visual record of a migrated page rather than interactive WebDriver assertions, ScreenshotNeo returns a screenshot or PDF from one GET request. It accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; each step can be turned off. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients.
Read the parameter reference in the ScreenshotNeo documentation. The same request can be made with cURL:
Best Value
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo also supports full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets and custom viewports, retina scale, PDF paper and page-range controls, custom CSS and JavaScript, clicks, selector or network-idle waits, request and resource blocking, headers, cookies, user agents, Authorization, timezone and geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API and an OpenAPI specification. Its parameter names also match those used by other screenshot APIs, which eases migration.
The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is on every plan. Create a free ScreenshotNeo account to try it without a card.
FAQ
Frequently Asked Questions
Can I run a Flash-enabled browser on Sauce Labs?
Current Sauce Labs browser sessions are not a supported way to execute Flash. Adobe blocked Flash content in 2021, so migrate the application or preserve the old asset only as a non-executing fixture.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Should Flash settings go under sauce:options?
No. sauce:options is for Sauce Labs metadata and settings. Browser-specific values belong in the relevant Selenium Options object, and obsolete Flash values should be removed rather than relocated.
Do I need to change a test that only takes screenshots?
If it waits for a Flash object, yes. Replace that wait with a stable selector or application readiness signal; otherwise the capture step can time out even when the page itself loads.
Are Selenium 3 Desired Capabilities still appropriate for this cleanup?
Use Selenium 4 Options and W3C capabilities for current sessions. Legacy capability classes make it easier to send unsupported or incorrectly namespaced keys.
The Bottom Line
There is no current Flash switch to enable or disable in Sauce Labs: Flash is retired. Remove legacy plugin configuration, migrate the application and assertions to supported web technologies, and use Selenium 4 Options with Sauce settings under sauce:options.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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.

