# Syntax for using multiline statements like an IF ELSE block

**URL:** <https://travis-ci.community/t/syntax-for-using-multiline-statements-like-an-if-else-block/12164>\
**Category:** Travis CI Discussions & Feedback\
**Tags:** travis-yml\
**Created:** [September 23, 2021, 6:34pm UTC](https://travis-ci.community/t/syntax-for-using-multiline-statements-like-an-if-else-block/12164 "2021-09-23T18:34:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [September 24, 2021, 6:26pm UTC](https://travis-ci.community/t/syntax-for-using-multiline-statements-like-an-if-else-block/12164/2 "2021-09-24T18:26:55Z")

</div>

> [@WebDriverError: unknown error: cannot find Chrome binary(Mocha test)](https://travis-ci.community/t/webdrivererror-unknown-error-cannot-find-chrome-binary-mocha-test/11569/5):
>
> before\_install: if [[$TRAVIS\_OS\_NAME == "windows"]]; then This is invalid YAML. A multiline command should be inserted as a [YAML literal block](https://yaml-multiline.info/): 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](https://config.travis-ci.com/explore) to check whether your .travis.yml can be parsed and what it is parsed into.

---

_[View the full topic](https://travis-ci.community/t/syntax-for-using-multiline-statements-like-an-if-else-block/12164)._
