Goal
Prepare Appium Chromium Driver by validating Node/npm, Appium 3, driver install, browser prerequisites, and smoke checks.
Decision Logic
- If host OS is not macOS, Linux, or Windows: stop.
- If Node.js misses
appium/appium-chromium-driverengines: install active LTS. - If npm misses
appium-chromium-driverengines: upgrade npm. - If Appium CLI is not installed: install
appiumglobally. - Use global npm/Appium (
npm install -g appium,appium ...) unless the user asks fornpx. - If Appium major version is
< 3: upgrade Appium to 3.x before installing or validatingchromium. - If the
chromiumdriver is not installed: install it via Appium CLI. - If install returns "already installed", ignore the error and continue (or run driver update).
- If
appium driver doctor chromiumis supported and reports required fixes: resolve each required item and re-run doctor. - If doctor is not supported for
chromiumin the active Appium/driver version: use install/list/smoke checks as the completion gate. - If no supported Chromium-based browser is available (
chrome/chromium/msedge): pause and ask the user which browser to automate and install. - If no supported Chromium-based browser is available and the user explicitly approves optional browser setup: install Chrome or Chromium with OS-native package tooling, then re-run browser availability checks.
- If running inside WSL and browser install is requested: prefer distro package-manager installation as root in WSL (for example via
wsl -u root) rather than user-space.debextraction, because runtime shared-library dependencies are otherwise easy to miss. - If Chrome is present but fails to start with missing shared libraries (for example
libnspr4.so): treat this as an incomplete Linux dependency install and fix with package-manager dependencies before continuing. - If the user does not request a pinned chromedriver version and no chromedriver binary is present in the environment: run
appium driver run chromium install-chromedriverbefore smoke validation. - If the user explicitly targets Microsoft Edge: treat
msedgedriversetup as a separate optional step, require a driver version matching the installed Edge build, and pass it throughappium:executablebecause automatic chromedriver download does not cover Edge.
Instructions
-
Run prerequisite skill Run
environment-setup-node. Continue only after its completion criteria pass. -
Install/upgrade Appium and Chromium driver
npm install -g appium@latest appium driver install chromium || appium driver update chromium appium driver list --installed --json || appium driver list --installedOnly use
appium driver update chromium --unsafeafter the user approves the risk of a major driver update. Prefer--jsonoutput for machine-readable verification. Confirm achromiumkey is present; only fallback to plain-text output when--jsonis unsupported. If the install command fails only becausechromiumis already installed, continue and do not stop preparation. -
Validate Appium command health and compatibility macOS/Linux:
appium -v appium driver list --installed --json || appium driver list --installed npm view appium engines --json npm view appium-chromium-driver engines peerDependencies --jsonWindows PowerShell:
appium -v appium driver list --installed --json; if ($LASTEXITCODE -ne 0) { appium driver list --installed } npm view appium engines --json npm view appium-chromium-driver engines peerDependencies --jsonVerify Appium major version is
3and that active Node/npm versions satisfy the reported ranges. -
Validate browser availability (Chrome/Chromium/Edge) macOS/Linux:
command -v google-chrome || true command -v chromium || true command -v chromium-browser || true command -v msedge || trueWindows PowerShell:
Get-Command chrome.exe -ErrorAction SilentlyContinue Get-Command msedge.exe -ErrorAction SilentlyContinueConfirm at least one Chromium-based browser is available and note the target browser in the result summary.
Optional browser setup (run only when the user explicitly requests it):
- macOS (Homebrew):
brew install --cask google-chrome # or brew install --cask chromium # or brew install --cask microsoft-edge- Linux (Debian/Ubuntu examples):
sudo apt-get update sudo apt-get install -y chromium-browser || sudo apt-get install -y chromium # Microsoft Edge example curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg sudo install -o root -g root -m 644 microsoft.gpg /usr/share/keyrings/microsoft.gpg echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/edge stable main" | sudo tee /etc/apt/sources.list.d/microsoft-edge.list sudo apt-get update sudo apt-get install -y microsoft-edge-stable- WSL from Windows host (Debian/Ubuntu examples, no interactive sudo prompt):
wsl -u root -e bash -lc "apt-get update" wsl -u root -e bash -lc "apt-get install -y libnspr4 libnss3 libxss1 libasound2t64 libatk-bridge2.0-0 libatk1.0-0 libcups2t64 libdrm2 libgbm1 libgtk-3-0 xdg-utils" wsl -u root -e bash -lc "apt-get install -y google-chrome-stable || apt-get install -y chromium-browser || apt-get install -y chromium"- Windows PowerShell (winget):
winget install --id Google.Chrome --exact --accept-source-agreements --accept-package-agreements # or winget install --id Hibbiki.Chromium --exact --accept-source-agreements --accept-package-agreements # or winget install --id Microsoft.Edge --exact --accept-source-agreements --accept-package-agreementsAfter installation, re-run the browser availability checks in this step.
-
Install chromedriver when missing (default) or pin it (on request) If the user does not request a specific chromedriver version, first check whether a chromedriver binary is available: macOS/Linux:
command -v chromedriver || trueWindows PowerShell:
Get-Command chromedriver.exe -ErrorAction SilentlyContinueIf no chromedriver binary is found, run:
appium driver run chromium install-chromedriverUse version/directory pinning only when the user explicitly requests manual pinning or mirrored download flows. macOS/Linux examples:
CHROMEDRIVER_VERSION=131.0.6778.3 appium driver run chromium install-chromedriver CHROMEDRIVER_EXECUTABLE_DIR=/path/to/dir appium driver run chromium install-chromedriverWindows PowerShell examples:
$env:CHROMEDRIVER_VERSION='131.0.6778.3'; appium driver run chromium install-chromedriver; Remove-Item Env:\CHROMEDRIVER_VERSION $env:CHROMEDRIVER_EXECUTABLE_DIR='C:\path\to\folder'; appium driver run chromium install-chromedriver; Remove-Item Env:\CHROMEDRIVER_EXECUTABLE_DIROptional Edge WebDriver setup (run only when the user explicitly requests Microsoft Edge automation):
- Appium Chromium Driver does not autodownload
msedgedriver. - Download the Microsoft Edge WebDriver version matching the installed Edge build from the official Microsoft Edge WebDriver page:
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ - Verify the installed Edge version first: macOS:
defaults read "/Applications/Microsoft Edge.app/Contents/Info" CFBundleShortVersionStringLinux:
microsoft-edge --versionWindows PowerShell:
(Get-Item "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe").VersionInfo.ProductVersion- After downloading and extracting
msedgedriver, place it in a stable path and confirm it works: macOS/Linux:
chmod +x /path/to/msedgedriver /path/to/msedgedriver --versionWindows PowerShell:
& "C:\path\to\msedgedriver.exe" --version- For Edge sessions, pass the absolute driver path through capabilities:
{ "platformName": "macOS", "browserName": "MicrosoftEdge", "appium:automationName": "Chromium", "appium:executable": "/absolute/path/to/msedgedriver" } - Appium Chromium Driver does not autodownload
-
Run Appium doctor for Chromium when supported
appium driver doctor chromiumUse
0 required fixes neededas the pass/fail gate when doctor is supported. Optional warnings are non-blocking. If required fixes remain, apply targeted fixes and re-run. If command output indicates the driver does not expose doctor checks, mark doctor asnot-supportedand continue with install/list/smoke checks. -
Start Appium server smoke test
appium serverWindows PowerShell recommended form (for deterministic log checks):
appium server --log "$env:TEMP\appium-chromium-smoke.log" --log-level infoKeep this server process running in Terminal A.
In Terminal B, run:
curl -s http://127.0.0.1:4723/statusFirst confirm
/statusresponds successfully.Then confirm startup/readiness from server logs and ensure the
Available drivers:block containschromium(for example:- chromium@<version> (automationName 'Chromium')). If startup banner logs are not available in your terminal integration, use this fallback verification path:appium driver list --installed --jsonincludeschromium/statusreports server readiness
After smoke validation, clean up the running Appium server:
- In Terminal A, stop the server with
Ctrl+C. - Verify no leftover Appium server process (Terminal B, macOS/Linux):
pgrep -fl "appium.*server" || echo "no appium server process"If
pgrepoutput appears to match only the check command itself, run a stricter verification:if ps -C node -o pid=,args= | grep -E 'appium.*server' > /dev/null; then ps -C node -o pid=,args= | grep -E 'appium.*server' else echo "no appium server process" fi- Verify no leftover Appium server process (Terminal B, Windows PowerShell):
if (Get-CimInstance Win32_Process | Where-Object { $_.CommandLine -match 'appium.*server' }) { Get-CimInstance Win32_Process | Where-Object { $_.CommandLine -match 'appium.*server' } | Select-Object ProcessId, Name, CommandLine } else { "no appium server process" } -
Agent completion criteria Mark the skill complete only when all are true:
appium driver list --installed --jsonincludeschromium(fallback toappium driver list --installedif--jsonis unsupported)appium -vsucceeds and is Appium 3.x- active Node/npm versions satisfy
appiumandappium-chromium-driverengines - if supported,
appium driver doctor chromiumreports0 required fixes needed(optional warnings are allowed) - if unsupported, result explicitly marks doctor status as
not-supported - if no chromedriver binary was present initially and no pinned version was requested, task result includes successful execution of
appium driver run chromium install-chromedriver - if Microsoft Edge automation was explicitly requested, task result includes installed Edge version,
msedgedriver --versionoutput, and the absolute path intended forappium:executable - task result includes browser availability check and the selected browser target (
chrome,chromium, ormsedge) - if optional browser setup was requested, task result includes browser install command(s) used and the post-install browser detection output
/statuscheck returns a successful status response (curlon macOS/Linux,Invoke-RestMethodretry loop recommended on Windows)- Appium server logs show startup/readiness successfully after the status check, or readiness is confirmed by
/statusplus JSON driver listing that includeschromium - if logs are available,
Available drivers:includes achromiumentry - Appium smoke-test server process is cleanly stopped after validation
Doctor Gate
Prefer doctor --json; fall back to text. If Chromium has no doctor, mark not-supported and require install/list/browser/smoke gates.
If doctor output changes and cannot be classified deterministically, mark the run as needs-manual-review and do not mark the skill complete unless doctor is explicitly not supported and all fallback gates pass.
Evidence To Report
appium -v- installed
chromiumdriver version fromappium driver list --installed --jsonor text fallback - selected browser target and browser version
- chromedriver or
msedgedriverversion and path when used - doctor result or explicit
not-supportedstatus /statussmoke-test response- server log evidence that
Available drivers:includeschromium - cleanup check showing no leftover Appium server process
Self-Improvement Prompt
After use, report any missing, ambiguous, outdated, or retry-causing instruction with section and proposed wording. Do not edit the skill unless asked.
Constraints
- Use global npm/Appium.
- Use
npx appiumonly if asked. - Optional warnings are non-blocking.
- Ask before optional/browser installs.
- Prefer CLI evidence.
- For privileged commands, pause and provide exact command.
- Claim success only after compatibility and smoke pass.