WebDriverError: unknown error: cannot find Chrome binary(Mocha test)

before_install:
 if [[ $TRAVIS_OS_NAME == "windows" ]]; then

This is invalid YAML. A multiline command should be inserted as a YAML literal block:

before_install:
- |
  if [[ $TRAVIS_OS_NAME == "windows" ]]; then
    echo Installing Google Chrome Stable...
    choco install googlechrome --acceptlicense --yes --no-progress --ignore-checksums
  fi

Use https://config.travis-ci.com/explore to check whether your .travis.yml can be parsed and what it is parsed into.

1 Like