Play a scene with input
godot_playRun a Godot scene headless for set physics frames, inject timed input actions, and sample watched property values per frame to verify jumps, movement, damage, or timers without a screen.
Instructions
Run a scene in Godot 4.7 headless for a number of physics frames, press and release input actions (or keys, mouse and joypad buttons) on the frames you give, and return a table of the values you watch per frame, plus errors and prints. The game sees each input on exactly that physics frame, and runs are deterministic. input steps are a frame, a verb (press, release, tap, or hold with a frame count) and an action or an event such as Key:Space; watch entries are a node path from the scene root, a dot, then a property or a method call; every sets how often values are sampled. Use it to check that the player jumps, moves, takes damage or that a timer fires, without a screen. An error result when the run does not finish or Godot reports an error; an unknown input action gives a warning. Your scenes and scripts are not changed: Godotwright runs it through a temporary script in .godot/godotwright/ and removes it afterwards. For assertions kept in the project use godot_test; for load errors use godot_check.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | The project folder, or any file or folder inside it (Godotwright walks up to project.godot). Relative paths start at the server's folder. Default: the current project. | |
| every | No | sample every n frames (default 10); frames with input and the last frame are always sampled | |
| input | No | timeline: "10 press jump; 30 release jump; 40 hold right 20; 50 tap Key:Space" | |
| scene | No | the res:// scene to run (default: the main scene) | |
| watch | No | values to sample: Player.position, Player.velocity.y, Player.is_on_floor() | |
| frames | No | physics frames to run (default 120) | |
| timeout_seconds | No | timeout of the run (default 300) |