Description

The /undo command removes the last generated command or step from the current test script. This is useful for quickly correcting mistakes or removing unintended actions during an interactive session.

Usage

/undo

Behavior

  • The /undo command removes the most recently added command or step from the test script.
  • You can call /undo multiple times to remove multiple commands or steps.

Example usage

Before /undo

- step: 
    - command: scroll-until-text
      text: Add to cart
- step: 
    - command: hover-text
      text: Add to cart
      action: click

After /undo

- step: 
    - command: scroll-until-text
      text: Add to cart

Protips

  • Use /undo immediately after generating a command to quickly fix mistakes or refine your test script.
  • Combine /undo with /save to iteratively build and refine your test scripts.

Gotchas

  • The /undo command only removes the last generated command or step. If you need to undo multiple actions, call /undo repeatedly.
  • Once a session is closed, you can’t undo previously saved commands.

Notes

  • The /undo command is ideal for interactive sessions where you are experimenting with test generation.
  • This command helps maintain a clean and accurate test script by allowing quick corrections.