Selenium-standalone -
If you have ever tried to set up a web automation suite (using Selenium WebDriver) on a new machine or a CI/CD pipeline, you know the drill. You download the ChromeDriver, make sure it matches your browser version, move it to /usr/local/bin , grant permissions, then do the same for GeckoDriver (Firefox) and EdgeDriver.
Try selenium-standalone and reclaim your sanity. Have a tip for managing WebDriver in large monorepos? Let me know in the comments below! selenium-standalone
// setup.js const { start, install } = require('selenium-standalone'); let server; If you have ever tried to set up
before(async function() { // Ensure drivers are installed (safe to call every time) await install(); // Start the server server = await start(); console.log('Selenium ready'); }); Have a tip for managing WebDriver in large monorepos
No more "forgetting to start the Selenium server" errors on Monday morning. This is where selenium-standalone shines. Your pipeline becomes deterministic.
name: E2E Tests on: [push] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '20' - run: npm ci
Here is a setup.js file that starts the server before your tests run and kills it after: