Skip to content

docs: safaridriver has no CLI; copy the cached binary for selenium on Windows - #40

Merged
plum117 merged 2 commits into
webdriverio:mainfrom
plum117:docs/safaridriver-cli-and-windows-link
Oct 9, 2026
Merged

plum117 merged 2 commits into
webdriverio:mainfrom
plum117:docs/safaridriver-cli-and-windows-link

Conversation

@plum117

@plum117 plum117 commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Why

Two instructions from the README rewrite of 2026-09-20 do not work:

  • npx safaridriver --port=4444 fails: npm error could not determine executable to run (checked with safaridriver@2.0.0). The package has no bin; Safaridriver itself is /usr/bin/safaridriver on macOS.
  • The Windows mklink note links %APPDATA%\npm\node_modules\geckodriver\geckodriver.exe, which does not exist. The packages download the binary into their cache folder: geckodriver-<version>.exe in GECKODRIVER_CACHE_DIR (getBinaryFilename()), msedgedriver.exe in EDGEDRIVER_CACHE_DIR, both defaulting to os.tmpdir().

Change

  • Root README, CLI usage: no npx safaridriver line; a note to run /usr/bin/safaridriver --port=4444 directly, after safaridriver --enable once.
  • Root README and geckodriver README, Windows note: set the cache folder, run geckodriver --version once, and copy the versioned binary to a folder on PATH (copy needs no administrator rights, unlike mklink for files). The root note also names Selenium Manager, which recent selenium-webdriver versions use to download drivers.

Test plan

  • GECKODRIVER_CACHE_DIR=<dir> node bin/geckodriver.js --version (macOS): downloads geckodriver-0.37.1 into <dir> (.exe on Windows per getBinaryFilename())
  • npx --no-install safaridriver --help with safaridriver@2.0.0 installed: could not determine executable to run
  • The cmd steps are not run on Windows here

🤖 Generated with Claude Code

… Windows

`npx safaridriver` fails with "could not determine executable to run":
the package has no bin. The Windows note linked
node_modules\geckodriver\geckodriver.exe, which does not exist: the
binary is downloaded into the cache folder as geckodriver-<version>.exe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@plum117
plum117 marked this pull request as ready for review October 9, 2026 20:20
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the previous copy issue is fixed.

Summary

The PR corrects the Safari launch instructions and explains how to copy a cached Windows driver.

  • Safari users can start Safaridriver directly from macOS.
  • Windows users can copy the cached Geckodriver binary to a folder on PATH.

Reviews (2) · Last reviewed commit: "docs: copy one exact geckodriver version..." · Reviewed by Greptile

Comment thread README.md Outdated
With a wildcard, Windows `copy` joins all matching files into one, so a
cache with two versions gave a broken binary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@plum117
plum117 merged commit 5672ce0 into webdriverio:main Oct 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant