LogoLogo
  • Overview
    • Quickstart
    • FAQ
    • Overview
    • Pricing
    • Comparison
    • Discord
  • Pro Setup
    • Book a Demo
    • 30x30 Promotion
  • Guides
    • Generate a Test Suite
    • Local Agent Setup
    • Prompting
    • Getting an API Key
    • GitHub Actions
      • GitHub Action Setup
      • Prerun Scripts
      • Environment Config
      • Parallel Testing
      • Storing Secrets
      • Optimizing Performance
      • Action Output
      • Examples
        • Test Generation
        • Parallel Testing
        • Importing Tests
        • Desktop Apps
        • Secure Log In
    • Debugging Test Runs
    • Monitoring Performance
  • Reference
    • Test Steps
      • assert
      • exec
      • focus-application
      • hover-image
      • match-image
      • hover-text
      • if
      • press-keys
      • remember
      • run
      • scroll
      • scroll-until-image
      • scroll-until-text
      • type
      • wait
      • wait-for-image
      • wait-for-text
    • Interactive Commands
      • /assert
      • /undo
      • /save
      • /run
      • /generate
    • CLI
      • testdriverai init
      • testdriverai [file]
      • testdriverai run [file]
  • Security & Privacy
    • Agent
    • Action
    • Dashboard
  • FAQ
    • Screen Recording Permissions (Mac Only)
    • Status Page
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Reference
  2. Test Steps

exec

Execute cli commands on the runner

Argument
Type
Description

cli

string

The cli commands to run.

silent

boolean

Log the output?

output

variable

Define the name of a variable for output

Example

version: 4.2.10
session: 67a3fdacd06c99b9c179b566
steps:
  - prompt: exec
    commands:
      - command: exec
        cli: pwd
        silent: false
        output: my_var
  - prompt: type ls
    commands:
      - command: type
        text: ${OUTPUT.my_var}

Example Output

❯ node index.js run testdriver/testdriver.yml
Spawning GUI...
Howdy! I'm TestDriver v4.2.13
Working on /Users/ianjennings/Development/testdriverai/testdriver/testdriver.yml

This is beta software!
Join our Discord for help
https://discord.com/invite/cWDFW8DzPm

running /Users/ianjennings/Development/testdriverai/testdriver/testdriver.yml...

exec
command='exec' cli='pwd' output='my_var'
/Users/ianjennings/Development/testdriverai


type ls
command='type' text='/Users/ianjennings/Development/testdriverai
'
/Users/ianjennings/Development/testdriverai
PreviousassertNextfocus-application

Last updated 1 month ago

Was this helpful?