Version: 2.0


The Element Command Line Interface (CLI) is a powerful tool that makes it fast and easy to get started with browser level performance testing with Flood Element. It helps you scaffold a new project, then generate, write, validate, and run your scripts on your local machine. When you're ready, you can upload your test scripts to Flood and be confident they’ll run exactly as expected, just like they did on your local machine.

Choosing Yarn or NPM

We use the Yarn package manager throughout these docs, however, each command is has a compatible NPM equivelant.

Flood Support

Element 2.0 is not enabled by default on Flood and is in Preview mode. Please contact support if you would like to enable its use on your account.

The current default version of Element run on Flood is version 1.5.1, please visit the documentation for Element 1.5.1 if the Element 2.0 Preview has not been enabled on your account.

A list of the default versions of all tools run on Flood is available within the Default tool versions guide.

If you are on macOS and don't already have NodeJS installed, consider installing Element using homebrew. This will install Element along with anything else it needs to run, such as NodeJS. Install using Homebrew:
brew install floodio/taps/element

Or if you prefer using Yarn or NPM:

yarn global add element-cli
npm -g install element-cli

Local versioning#

Element is smart enough to detect whether you're using a custom version of Element locally or using the global install.

If you add element-cli to your local project package.json, Element will use that version, otherwise, it will default to your global version.

Getting help#

The Element CLI comes with built in help that details the commands and options available. Run:

element help

to see a list of commands and global the Element CLI supports. To get more detailed information about a specific command, and the options it accepts, pass it the --help flag.

For example, to learn more about the run command and the options you can pass in, run:

element run --help

In the next section, we'll talk about how to create your first Element project.