Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 1.91 KB

safari.md

File metadata and controls

63 lines (46 loc) · 1.91 KB

Safari

To run the tests with Safari on macOS, follow these steps:

  1. Configure Safari to Enable WebDriver Support (see Testing with WebDriver in Safari):

    safaridriver --enable
    

    For Safari Technology Preview:

    /Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver --enable
    
  2. Download and install MJPEG Server as mjpeg-server in your PATH and install FFmpeg and NGINX via Homebrew:

    brew install ffmpeg nginx
  3. Add the example host to your /etc/hosts file:

    printf '127.0.0.1\t%s\n' example | sudo tee -a /etc/hosts
  4. Start safaridriver with nginx as reverse proxy:

    bin/safaridriver.sh [-t]

    Providing the -t argument starts the safaridriver for Safari Technology Preview and requires setting browserName in ../conf/safari.js to safari technology preview.

  5. Start mjpeg-server to provide a MJPEG stream of the macOS desktop to capture video records of the test runs:

    bin/mjpeg-server.sh [screen index]

    Providing a number as screen index (e.g. 2) allows to use a different capture screen. Running the command without this argument will display a selection of available screens if there are more than one available.

    Please Note:
    The Terminal application the mjpeg-server command is started from requires Screen Recording permissions:
    System Preferences => Security & Privacy => Privacy => Screen Recording

  6. Run the tests with Safari:

    docker-compose run --rm wdio conf/safari.js