```yaml testdriver/exec-js.yaml highlight={6-17}
version: 6.0.0
steps:
  - prompt: fetch user data from API
    commands:
      - command: exec
        output: user
        lang: js
        code: |
          const response = await
          fetch('https://jsonplaceholder.typicode.com/users');

          const user = await response.json();

          console.log('user', user[0]);

          result = user[0].email;
      - command: hover-text
        text: Username
        description: input field for username
        action: click
      - command: type
        text: ${OUTPUT.user}
  - prompt: assert that the username field shows a valid email address
    commands:
      - command: focus-application
        name: Google Chrome
      - command: assert
        expect: >-
          the username field contains "Sincere@april.biz" which is a valid email
          address
```
