# Commands

Assuming you want to switch the process to the next step, it would look like this:

<pre class="language-javascript"><code class="lang-javascript"><strong>replay.next().run()
</strong></code></pre>

### Chaining calls

All commands can be freely combined

```javascript
replay.dispatchEvent().next().repeat(2).run()
```

### API  <a href="#api-can-kao" id="api-can-kao"></a>

| Command          | Description                                                |
| ---------------- | ---------------------------------------------------------- |
| run              | Execute all commands in the chain.                         |
| next             | Switch to the next step                                    |
| prev             | Switch to the previous step                                |
| clear            | Clear all commands                                         |
| wait             | Wait for time (default 500ms)                              |
| dispatchEvent    | Execute the behavior of the current ActionStep             |
| waitPageComplete | Wait for the page to finish loading                        |
| repeat           | Repeat execution                                           |
| anima            | Control the display and hiding of the UI positioning frame |
