// readme

WebdriverIO Camera Service

A WebdriverIO service that enables camera feed injection for testing applications that use camera/video inputs. This service allows you to mock camera feeds with pre-recorded video files during automated testing.

Features

  • πŸŽ₯ Inject custom video feeds into Chrome browsers during testing
  • πŸ”„ Dynamically change camera sources during test execution
  • πŸ“ Automatic video directory management
  • πŸ”„ Automatic format conversion - Use MP4, WebM, PNG, JPG and more (requires FFmpeg)
  • πŸ’Ύ Smart caching - Converted files are cached to avoid re-conversion
  • πŸ§ͺ Perfect for testing camera-dependent applications like QR code scanners, video conferencing, etc.

Installation

npm install --save-dev wdio-camera-service

Configuration

Add the camera service to your WebdriverIO configuration:

// wdio.conf.ts
export const config: WebdriverIO.Config = {
  // ... other config
  services: [
    ['camera', {
      defaultCameraFeed: './camera/default.mjpeg',
      videoDirectory: './camera/video',
    }],
  ],
  // ... other config
};

Service Options

| Option | Type | Required | Default…