Run your test while selenium-standalone start is running in another terminal. They will connect automatically. The CLI is great, but the real power is using the API inside your test setup hooks.
npx selenium-standalone install Pro tip: Add --singleDriverInstall=chrome if you only need Chrome to save bandwidth. npx selenium-standalone start You will see output like: selenium-standalone
Taming the Browser: Why selenium-standalone is a Game Changer for Web Automation Published: April 14, 2026 Reading Time: 4 minutes Run your test while selenium-standalone start is running
// test.js const { remote } = require('webdriverio'); (async () => { const browser = await remote({ capabilities: { browserName: 'chrome', 'goog:chromeOptions': { args: ['headless', 'no-sandbox'] // Great for CI } }, port: 4444 // Your selenium-standalone port }); (async () =>
Here is a setup.js file that starts the server before your tests run and kills it after:
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
Copyright (c) 2020-2021 Fujian Wiwo Electronic Technology Co., Ltd. 备案号:闽ICP备18007537号