This is an automated email from the ASF dual-hosted git repository.

sfirke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 396030d87e0 docs: remove stale Selenium references after 
Playwright-only switch (#44243)
396030d87e0 is described below

commit 396030d87e0ea9647fbd7c5be865de6775168b0a
Author: Sam Firke <[email protected]>
AuthorDate: Fri Oct 2 18:09:31 2026 -0400

    docs: remove stale Selenium references after Playwright-only switch (#44243)
---
 docs/admin_docs/configuration/alerts-reports.mdx   | 57 ++++++++++++----------
 docs/admin_docs/configuration/cache.mdx            | 37 +++++++++++---
 .../configuration/dashboard-performance.mdx        |  4 +-
 .../contributing/development-setup.md              |  4 +-
 docs/developer_docs/testing/backend-testing.md     |  3 +-
 5 files changed, 64 insertions(+), 41 deletions(-)

diff --git a/docs/admin_docs/configuration/alerts-reports.mdx 
b/docs/admin_docs/configuration/alerts-reports.mdx
index da64668db4b..347be259eb2 100644
--- a/docs/admin_docs/configuration/alerts-reports.mdx
+++ b/docs/admin_docs/configuration/alerts-reports.mdx
@@ -50,13 +50,11 @@ Screenshots will be taken but no messages actually sent as 
long as `ALERT_REPORT
 
 #### In your `Dockerfile`
 
-You'll need to extend the Superset image to include a headless browser. Your 
options include:
+As of 7.0.0, Superset takes screenshots only with 
[Playwright](https://playwright.dev/python/) driving a headless Chromium 
browser. Selenium, Firefox, geckodriver and the `WEBDRIVER_TYPE` setting are 
not supported, and no feature flag is needed to use Playwright. Prior to 7.0.0, 
users were responsible for installing their own headless browser, and could use 
Selenium if desired.
 
-- Use Playwright with Chromium: this is the recommended approach as of version 
4.1.x or greater. Playwright always uses Chromium — the `WEBDRIVER_TYPE` config 
setting has no effect when Playwright is active. A working example of a 
Dockerfile that installs these tools is provided under "Building your own 
production Docker image" on the [Docker 
Builds](/admin-docs/installation/docker-builds#building-your-own-production-docker-image)
 page. Enable the `PLAYWRIGHT_REPORTS_AND_THUMBNAILS` feat [...]
-- Use Firefox (Selenium): you'll need to install geckodriver and Firefox. Set 
`WEBDRIVER_TYPE` to `"firefox"` in your `superset_config.py`.
-- Use Chrome (Selenium): you'll need to install Chrome. Set `WEBDRIVER_TYPE` 
to `"chrome"` in your `superset_config.py`.
-
-In Superset versions &lt;=4.0x, users installed Firefox or Chrome and that was 
documented here.
+- The default Superset image (for example the `latest` and `<version>` tags) 
includes Playwright and Chromium.
+- The `-lean` and `-dev` images do not. To add them to an image based on 
`-lean`, see the example Dockerfile under "Building your own production Docker 
image" on the [Docker 
Builds](/admin-docs/installation/docker-builds#building-your-own-production-docker-image)
 page.
+- To build the `dev` target from source with Chromium, pass `--build-arg 
INCLUDE_CHROMIUM=true`. With Docker Compose, run `INCLUDE_CHROMIUM=true docker 
compose build`.
 
 Only the worker container needs the browser.
 
@@ -388,20 +386,13 @@ SMTP_PASSWORD = "your_password" # use the empty string "" 
if using an unauthenti
 SMTP_MAIL_FROM = "[email protected]"
 EMAIL_REPORTS_SUBJECT_PREFIX = "[Superset] " # optional - overwrites default 
value in config.py of "[Report] "
 
-# WebDriver configuration
-# If you use Firefox or Playwright with Chrome, you can stick with default 
values
-# If you use Chrome and are *not* using Playwright, then add the following 
WEBDRIVER_TYPE and WEBDRIVER_OPTION_ARGS
-WEBDRIVER_TYPE = "chrome"
-WEBDRIVER_OPTION_ARGS = [
-    "--force-device-scale-factor=2.0",
-    "--high-dpi-support=2.0",
-    "--headless",
-    "--disable-gpu",
-    "--disable-dev-shm-usage",
-    "--no-sandbox",
-    "--disable-setuid-sandbox",
-    "--disable-extensions",
-]
+# Screenshot browser configuration
+# Playwright always launches Chromium, so there is no browser type to set, and 
the
+# defaults work for most deployments. The values below are the defaults. To 
render
+# sharper screenshots, raise pixel_density in WEBDRIVER_WINDOW. Extra Chromium
+# launch arguments can be passed with WEBDRIVER_OPTION_ARGS.
+# WEBDRIVER_WINDOW = {"dashboard": (1600, 2000), "slice": (3000, 1200), 
"pixel_density": 1}
+# WEBDRIVER_OPTION_ARGS = []
 
 # This is for internal use, you can keep http
 WEBDRIVER_BASEURL = "http://superset:8088"; # This is also the default for 
Docker Compose, where the app service is named "superset"
@@ -429,10 +420,11 @@ Please refer to `ExecutorType` in the codebase for other 
executor types.
 
 **Important notes**
 
-- Be mindful of the concurrency setting for celery (using `-c 4`). 
Selenium/webdriver instances can
-  consume a lot of CPU / memory on your servers.
-- In some cases, if you notice a lot of leaked geckodriver processes, try 
running your celery
-  processes with `celery worker --pool=prefork --max-tasks-per-child=128 ...`
+- Be mindful of the concurrency setting for celery (using `-c 4`). Each worker 
process keeps its own
+  headless Chromium instance, and these can consume a lot of CPU / memory on 
your servers.
+- If worker memory grows over time, try running your celery processes with
+  `celery worker --pool=prefork --max-tasks-per-child=128 ...` so that worker 
processes, and the
+  Chromium instances they own, are recycled periodically.
 - It is recommended to run separate workers for the `sql_lab` and 
`email_reports` tasks. This can be
   done using the `queue` field in `task_annotations`.
 - Adjust `WEBDRIVER_BASEURL` in your configuration file if celery workers 
can’t access Superset via
@@ -610,11 +602,22 @@ omitted. Cookies, authentication headers, URLs, SQL, and 
query payloads are not
 included in these transport diagnostics. HTTP 400 therefore remains a failure 
to
 investigate, not a reason to repeat the same request.
 
-### Check web browser and webdriver installation
+### Check the Playwright and Chromium installation
+
+To take a screenshot, the worker visits the dashboard or chart using a 
headless Chromium browser controlled by Playwright, then takes a screenshot. If 
you are able to send a chart as CSV, XLSX, or text but can't send as PNG, your 
problem may lie with the browser. If the Playwright package isn't installed, 
screenshot attempts fail with an error that includes `Playwright is required 
for screenshots`. If Playwright is installed but Chromium is missing or fails 
to launch, the error includes  [...]
+
+If you are handling the installation of the headless browser on your own, 
confirm that Chromium launches in the worker environment. Start Python in your 
worker environment and run:
 
-To take a screenshot, the worker visits the dashboard or chart using a 
headless browser, then takes a screenshot. If you are able to send a chart as 
CSV, XLSX, or text but can't send as PNG, your problem may lie with the browser.
+```python
+from playwright.sync_api import sync_playwright
+
+with sync_playwright() as p:
+    browser = p.chromium.launch()
+    print(browser.version)
+    browser.close()
+```
 
-If you are handling the installation of the headless browser on your own, do 
your own verification to ensure that the headless browser opens successfully in 
the worker environment.
+This should print the Chromium version.
 
 ### Send a test email
 
diff --git a/docs/admin_docs/configuration/cache.mdx 
b/docs/admin_docs/configuration/cache.mdx
index 7c724ab9d3a..855bb13c10b 100644
--- a/docs/admin_docs/configuration/cache.mdx
+++ b/docs/admin_docs/configuration/cache.mdx
@@ -241,7 +241,9 @@ FEATURE_FLAGS = {
 }
 ```
 
-By default thumbnails are rendered per user, and will fall back to the 
Selenium user for anonymous users.
+By default thumbnails are rendered as the user who requests them. Anonymous 
requests have no user
+to render as, so they get no thumbnail unless you add a fallback executor, for 
example
+`THUMBNAIL_EXECUTORS = [ExecutorType.CURRENT_USER, FixedExecutor("admin")]`.
 To always render thumbnails as a fixed user (`admin` in this example), use the 
following configuration:
 
 ```python
@@ -286,7 +288,7 @@ THUMBNAIL_CACHE_CONFIG = init_thumbnail_cache
 ```
 
 Using the above example cache keys for dashboards will be 
`superset_thumb__dashboard__{ID}`. You can
-override the base URL for Selenium using:
+override the base URL that the headless browser uses to reach Superset using:
 
 ```
 WEBDRIVER_BASEURL = "https://superset.company.com";
@@ -311,21 +313,40 @@ CACHE_WARMUP_EXECUTORS = [FixedExecutor("admin")]
 Use a dedicated read-only service account here rather than a personal admin 
account, so that
 thumbnail rendering and cache warmup tasks don't fail if a specific user's 
credentials change.
 
-Additional Selenium WebDriver configuration can be set using 
`WEBDRIVER_CONFIGURATION`. You can
-implement a custom function to authenticate Selenium. The default function 
uses the `flask-login`
-session cookie. Here's an example of a custom function signature:
+Thumbnails are rendered with Playwright and a headless Chromium browser. Extra 
Chromium launch
+arguments can be set using `WEBDRIVER_OPTION_ARGS`. You can implement a custom 
function to
+authenticate the Playwright browser context. The default function uses the 
`flask-login` session
+cookie. A custom function replaces that default, so it must authenticate as 
`user` itself.
+Here's an example of a custom function:
 
 ```python
-def auth_driver(driver: WebDriver, user: "User") -> WebDriver:
-    pass
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+    from flask_appbuilder.security.sqla.models import User
+    from playwright.sync_api import BrowserContext
+
+
+def auth_browser_context(
+    browser_context: "BrowserContext", user: "User"
+) -> "BrowserContext":
+    # This replaces Superset's default session-cookie login, so it must
+    # authenticate as `user` itself. For example, send a bearer token:
+    # `get_token_for_user` is a placeholder for your own token lookup.
+    token = get_token_for_user(user)
+    browser_context.set_extra_http_headers({"Authorization": f"Bearer 
{token}"})
+    return browser_context
 ```
 
 Then on configuration:
 
 ```
-WEBDRIVER_AUTH_FUNC = auth_driver
+WEBDRIVER_AUTH_FUNC = auth_browser_context
 ```
 
+To replace the authentication logic entirely, subclass 
`superset.utils.machine_auth.MachineAuthProvider`,
+override `authenticate_browser_context()`, and set 
`MACHINE_AUTH_PROVIDER_CLASS` to the fully-qualified dotted path of your class 
(for example, `"myapp.auth.MyMachineAuthProvider"`).
+
 ## ETag Support for Thumbnails
 
 Thumbnail and screenshot endpoints return `ETag` response headers based on the 
cached content digest. Clients can use conditional requests to avoid 
downloading unchanged images:
diff --git a/docs/admin_docs/configuration/dashboard-performance.mdx 
b/docs/admin_docs/configuration/dashboard-performance.mdx
index 3e90f859f92..5238b9f6731 100644
--- a/docs/admin_docs/configuration/dashboard-performance.mdx
+++ b/docs/admin_docs/configuration/dashboard-performance.mdx
@@ -174,9 +174,9 @@ scheduled table in the warehouse so each chart query is a 
cheap lookup.
 - See [Feature Flags](./feature-flags.mdx) for the full list of supported
   flags and their lifecycle stages.
 - Server-side screenshot jobs (alerts, scheduled reports, thumbnails)
-  render the dashboard in a headless, webdriver-controlled browser, which
+  render the dashboard in a headless Chromium browser driven by Playwright, 
which
   intentionally bypasses row virtualization so the rendered artifact
-  includes every chart, not just the ones above the fold. User-triggered
+  includes every chart on the active tab, not just the ones above the fold. 
User-triggered
   "download as image/PDF" is different: it captures whatever's currently
   rendered in the user's own browser, so it's still subject to
   virtualization like any other page view. Metadata/YAML dashboard export
diff --git a/docs/developer_docs/contributing/development-setup.md 
b/docs/developer_docs/contributing/development-setup.md
index 5a896e282ba..66916ee824a 100644
--- a/docs/developer_docs/contributing/development-setup.md
+++ b/docs/developer_docs/contributing/development-setup.md
@@ -95,8 +95,8 @@ documentation.
 Affecting the Docker build process:
 
 - **SUPERSET_BUILD_TARGET (default=dev):** which --target to build, either 
`lean` or `dev` are commonly used
-- **INCLUDE_FIREFOX (default=false):** whether to include the Firefox headless 
browser in the build
-- **INCLUDE_CHROMIUM (default=false):** whether to include the Chromium 
headless browser in the build
+- **INCLUDE_FIREFOX (default=false):** whether to include the Firefox headless 
browser in the build. Superset's screenshot features use only Chromium, so 
Alerts & Reports and thumbnails don't use it
+- **INCLUDE_CHROMIUM (default=false):** whether to include Playwright and the 
Chromium headless browser in the build, which Alerts & Reports and thumbnails 
need to take screenshots
 - **BUILD_TRANSLATIONS(default=false):** whether to compile the translations 
from the .po files available
 - **SUPERSET_LOAD_EXAMPLES (default=yes):** whether to load the examples into 
the database upon startup,
   save some precious time on startup by `SUPERSET_LOAD_EXAMPLES=no docker 
compose up`. Once the example
diff --git a/docs/developer_docs/testing/backend-testing.md 
b/docs/developer_docs/testing/backend-testing.md
index 700b8fd5814..8e52065226c 100644
--- a/docs/developer_docs/testing/backend-testing.md
+++ b/docs/developer_docs/testing/backend-testing.md
@@ -71,6 +71,7 @@ The Alerts & Reports feature relies on Celery for task 
scheduling and execution.
 
 - Redis running on `localhost:6379`
 - [MailHog](https://github.com/mailhog/MailHog) installed (a local SMTP server 
with a web UI for viewing caught emails)
+- Playwright and Chromium installed, for report screenshots
 
 ### superset_config.py
 
@@ -124,8 +125,6 @@ ALERT_REPORTS_EXECUTORS = [ExecutorType.EDITOR]
 
 FEATURE_FLAGS = {
     "ALERT_REPORTS": True,
-    # Recommended for better screenshot support (WebGL/DeckGL charts)
-    "PLAYWRIGHT_REPORTS_AND_THUMBNAILS": True,
 }
 ```
 

Reply via email to