Skip to content

自动生成

本页由 pnpm nodes 从 midscene-node-spec.web.md 生成,不要手改。改了 nodes/ 下的自定义节点后重新生成即可。

Midscene Test Node Spec ​

This document describes the Nodes available in YAML test files (.yaml or .yml) for the Midscene Test framework (@midscene/test). It lists the Nodes registered by the current Test Project, their inputs, and how to call them in test steps and lifecycle hooks.

Learn about the framework and YAML test authoring:

Available Nodes ​

This table lists all available Nodes. See Node Details below for each Node's usage and input schema.

NodeDescription
aiActPerform a natural-language task with a Midscene UI Agent.
aiAssertAssert a natural-language condition with a Midscene UI Agent.
actionCall a platform or custom action. Its ActionSpace schema validates params when the action executes.
aiAskRun aiAsk with a Midscene UI Agent and store its value.
aiBooleanRun aiBoolean with a Midscene UI Agent and store its value.
aiClearInputLocate an input element and clear its value with a Midscene UI Agent.
aiDoubleClickLocate and double-click an element with a Midscene UI Agent.
aiDragAndDropLocate source and destination elements, then drag the source to the destination.
aiHoverLocate and hover over an element with a Midscene UI Agent.
aiInputLocate an input element and enter a value with a Midscene UI Agent.
aiKeyboardPressPress a key or key combination, optionally targeting a located element.
aiLocateLocate an element from a natural-language description and store the result.
aiLongPressLocate and long-press an element with a Midscene UI Agent.
aiMiddleClickLocate and middle-click an element with a Midscene UI Agent.
aiNumberRun aiNumber with a Midscene UI Agent and store its value.
aiPinchPerform a pinch-in or pinch-out gesture with a Midscene UI Agent.
aiQueryExtract structured data from the current interface and store the result.
aiRightClickLocate and right-click an element with a Midscene UI Agent.
aiScrollScroll the page or a located region with a Midscene UI Agent.
aiStringRun aiString with a Midscene UI Agent and store its value.
aiTapLocate and tap an element with a Midscene UI Agent.
aiWaitForWait until a natural-language condition is satisfied.
clearCookiesClear all cookies from the current browser context, or only cookies matching name, domain, or path.
gotoUrlNavigate the current browser Page to an absolute HTTP(S) URL or a path relative to testRunner.baseURL or the current page URL.
javascriptEvaluate JavaScript in the current interface and store the result.
recordToReportAdd text or screenshots to the current Midscene report.
runGherkinScenarioExecute a Gherkin scenario with the current Midscene UI Agent.
setAIContextSet or remove Agent-level AI guidance for subsequent calls on the same Agent.
setCookiesLoad cookies from an environment variable, configured profile, or browser storage-state file without persisting cookie values in workflow input or output.
setViewportSizeSet the current browser Page viewport size in CSS pixels and return the effective size.
sleepWait for a fixed number of milliseconds, recording standard UI snapshots and honoring cancellation.
todo.captureStateRead the current TodoMVC DOM without asserting it, for lifecycle diagnostics and history.
todo.expectStateRead TodoMVC from the DOM and require the ordered titles and completed states to match exactly.
todo.seedCreate an ordered list of Todos through the visible input after todo.setup.
todo.setupOpen React TodoMVC in All view, clear its storage, reload, and require an empty list before seeding.
waitWait for a fixed duration while honoring cancellation.

Where to use these Nodes ​

Use these Nodes in Workflow Documents (.yaml or .yml files) selected by an Execution Project. Case file patterns and the config file path below are relative to this spec file. Case file patterns use glob syntax. A custom --config path does not change where case files are selected.

Projects created by midscene-test create select cases/**/*.{yaml,yml} by default, so you can write test cases in cases/example.yaml or subdirectories of cases/. If an Execution Project has no files configuration, Midscene Test searches **/*.{yaml,yml} recursively instead. Check projects[].files in your configuration before choosing a file location.

Config file: midscene.config.ts

Case files: cases/web/**/*.{yaml,yml} (Execution Project: web)

Files matching files.exclude are not selected. Midscene Test always ignores .git/, .midscene/, midscene_run/, and node_modules/ directories, including nested ones.

Call a Node in cases[].steps, or in the Workflow Document lifecycle steps beforeAll, beforeEach, afterEach, and afterAll. Root Nodes are shared defaults; projects[].nodes adds local Nodes and overrides same-named root Nodes only within that Execution Project. Each Execution Project supplies its own runtime environment.

Workflow Step Contract ​

Each step uses a node name as its key. The $ object contains engine metadata and is not part of the node input.

yaml
cases:
  - name: Example case
    steps:
      - node.name:
          prompt: Describe the task.
          $:
            timeout: 30000
            continue-on-error: false

A Node may map a string step value to one declared input field. Each Node section states whether it supports this shorthand and names the target field.

Each Node's returned data is saved on that Step's result. Results are not named or automatically passed to later Steps. A failed Case does not stop later Cases by default; test.bail controls early stopping across the run.

Node Details ​

aiAct ​

Perform a natural-language task with a Midscene UI Agent.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "anyOf": [
            {
              "const": "unset"
            },
            {
              "type": "boolean"
            }
          ]
        },
        "effort": {
          "enum": [
            "fast",
            "balance",
            "deepThink"
          ]
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "fileChooserAllowedDir": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

aiAssert ​

Assert a natural-language condition with a Midscene UI Agent.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "options": {
      "additionalProperties": false,
      "properties": {
        "context": {
          "type": "string"
        },
        "domIncluded": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "const": "visible-only"
            }
          ]
        },
        "keepRawResponse": {
          "type": "boolean"
        },
        "screenshotIncluded": {
          "type": "boolean"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

action ​

Call a platform or custom action. Its ActionSpace schema validates params when the action executes.

String shorthand: Not supported by this Node.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "name": {
      "format": "regex",
      "pattern": "\\S",
      "type": "string"
    },
    "params": {}
  },
  "required": [
    "name"
  ],
  "type": "object"
}

aiAsk ​

Run aiAsk with a Midscene UI Agent and store its value.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "context": {
          "type": "string"
        },
        "domIncluded": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "const": "visible-only"
            }
          ]
        },
        "screenshotIncluded": {
          "type": "boolean"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

aiBoolean ​

Run aiBoolean with a Midscene UI Agent and store its value.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "context": {
          "type": "string"
        },
        "domIncluded": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "const": "visible-only"
            }
          ]
        },
        "screenshotIncluded": {
          "type": "boolean"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

aiClearInput ​

Locate an input element and clear its value with a Midscene UI Agent.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "type": "boolean"
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "xpath": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

aiDoubleClick ​

Locate and double-click an element with a Midscene UI Agent.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "type": "boolean"
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "xpath": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

aiDragAndDrop ​

Locate source and destination elements, then drag the source to the destination.

String shorthand: Not supported by this Node.

Input Schema ​

json
{
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "from": {
      "$ref": "#/$defs/__schema0"
    },
    "options": {
      "additionalProperties": false,
      "properties": {
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "type": "boolean"
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "xpath": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "to": {
      "$ref": "#/$defs/__schema0"
    }
  },
  "required": [
    "from",
    "to"
  ],
  "type": "object"
}

aiHover ​

Locate and hover over an element with a Midscene UI Agent.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "type": "boolean"
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "xpath": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

aiInput ​

Locate an input element and enter a value with a Midscene UI Agent.

String shorthand: Not supported by this Node.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "autoDismissKeyboard": {
          "type": "boolean"
        },
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "type": "boolean"
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "inputStrategy": {
          "enum": [
            "legacy",
            "sequential",
            "bulk"
          ]
        },
        "keyboardTypeDelay": {
          "minimum": 0,
          "type": "number"
        },
        "mode": {
          "enum": [
            "replace",
            "clear",
            "typeOnly",
            "append"
          ]
        },
        "xpath": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    },
    "value": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        }
      ]
    }
  },
  "required": [
    "prompt",
    "value"
  ],
  "type": "object"
}

aiKeyboardPress ​

Press a key or key combination, optionally targeting a located element.

String shorthand: Maps to { keyName: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "keyName": {
      "format": "regex",
      "pattern": "\\S",
      "type": "string"
    },
    "options": {
      "additionalProperties": false,
      "properties": {
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "type": "boolean"
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "xpath": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "keyName"
  ],
  "type": "object"
}

aiLocate ​

Locate an element from a natural-language description and store the result.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "type": "boolean"
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "xpath": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

aiLongPress ​

Locate and long-press an element with a Midscene UI Agent.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "type": "boolean"
        },
        "duration": {
          "minimum": 0,
          "type": "number"
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "xpath": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

aiMiddleClick ​

Locate and middle-click an element with a Midscene UI Agent.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "type": "boolean"
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "xpath": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

aiNumber ​

Run aiNumber with a Midscene UI Agent and store its value.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "context": {
          "type": "string"
        },
        "domIncluded": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "const": "visible-only"
            }
          ]
        },
        "screenshotIncluded": {
          "type": "boolean"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

aiPinch ​

Perform a pinch-in or pinch-out gesture with a Midscene UI Agent.

String shorthand: Not supported by this Node.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "direction": {
      "enum": [
        "in",
        "out"
      ]
    },
    "options": {
      "additionalProperties": false,
      "properties": {
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "type": "boolean"
        },
        "distance": {
          "type": "number"
        },
        "duration": {
          "minimum": 0,
          "type": "number"
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "xpath": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "direction"
  ],
  "type": "object"
}

aiQuery ​

Extract structured data from the current interface and store the result.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "context": {
          "type": "string"
        },
        "domIncluded": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "const": "visible-only"
            }
          ]
        },
        "screenshotIncluded": {
          "type": "boolean"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": {
            "type": "string"
          },
          "propertyNames": {
            "type": "string"
          },
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

aiRightClick ​

Locate and right-click an element with a Midscene UI Agent.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "type": "boolean"
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "xpath": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

aiScroll ​

Scroll the page or a located region with a Midscene UI Agent.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "type": "boolean"
        },
        "direction": {
          "enum": [
            "down",
            "up",
            "right",
            "left"
          ]
        },
        "distance": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "scrollType": {
          "enum": [
            "singleAction",
            "scrollToBottom",
            "scrollToTop",
            "scrollToRight",
            "scrollToLeft",
            "once",
            "untilBottom",
            "untilTop",
            "untilRight",
            "untilLeft"
          ]
        },
        "xpath": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [],
  "type": "object"
}

aiString ​

Run aiString with a Midscene UI Agent and store its value.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "context": {
          "type": "string"
        },
        "domIncluded": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "const": "visible-only"
            }
          ]
        },
        "screenshotIncluded": {
          "type": "boolean"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

aiTap ​

Locate and tap an element with a Midscene UI Agent.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "type": "boolean"
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "xpath": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

aiWaitFor ​

Wait until a natural-language condition is satisfied.

String shorthand: Maps to { prompt: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "checkIntervalMs": {
          "exclusiveMinimum": 0,
          "type": "number"
        },
        "context": {
          "type": "string"
        },
        "domIncluded": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "const": "visible-only"
            }
          ]
        },
        "screenshotIncluded": {
          "type": "boolean"
        },
        "timeoutMs": {
          "exclusiveMinimum": 0,
          "type": "number"
        }
      },
      "required": [],
      "type": "object"
    },
    "prompt": {
      "anyOf": [
        {
          "format": "regex",
          "pattern": "\\S",
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "convertHttpImage2Base64": {
              "type": "boolean"
            },
            "images": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  },
                  "url": {
                    "format": "regex",
                    "pattern": "\\S",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              },
              "minItems": 1,
              "type": "array"
            },
            "prompt": {
              "format": "regex",
              "pattern": "\\S",
              "type": "string"
            }
          },
          "required": [
            "prompt"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "prompt"
  ],
  "type": "object"
}

clearCookies ​

Title: Clear browser cookies

Clear all cookies from the current browser context, or only cookies matching name, domain, or path.

String shorthand: Not supported by this Node.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "domain": {
      "format": "regex",
      "pattern": "\\S",
      "type": "string"
    },
    "name": {
      "format": "regex",
      "pattern": "\\S",
      "type": "string"
    },
    "path": {
      "format": "regex",
      "pattern": "\\S",
      "type": "string"
    }
  },
  "required": [],
  "type": "object"
}

gotoUrl ​

Title: Open a Web URL

Navigate the current browser Page to an absolute HTTP(S) URL or a path relative to testRunner.baseURL or the current page URL.

String shorthand: Maps to { url: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "timeoutMs": {
      "default": 60000,
      "exclusiveMinimum": 0,
      "maximum": 600000,
      "type": "number"
    },
    "url": {
      "minLength": 1,
      "type": "string"
    },
    "waitUntil": {
      "default": "domcontentloaded",
      "enum": [
        "commit",
        "domcontentloaded",
        "load",
        "networkidle",
        "networkidle0",
        "networkidle2"
      ]
    }
  },
  "required": [
    "url"
  ],
  "type": "object"
}

javascript ​

Evaluate JavaScript in the current interface and store the result.

String shorthand: Maps to { script: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "script": {
      "format": "regex",
      "pattern": "\\S",
      "type": "string"
    }
  },
  "required": [
    "script"
  ],
  "type": "object"
}

recordToReport ​

Add text or screenshots to the current Midscene report.

String shorthand: Maps to { title: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "content": {
          "type": "string"
        },
        "screenshotBase64": {
          "type": "string"
        },
        "screenshots": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "base64": {
                "minLength": 1,
                "type": "string"
              },
              "description": {
                "type": "string"
              }
            },
            "required": [
              "base64"
            ],
            "type": "object"
          },
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [],
      "type": "object"
    },
    "title": {
      "type": "string"
    }
  },
  "required": [],
  "type": "object"
}

runGherkinScenario ​

Execute a Gherkin scenario with the current Midscene UI Agent.

String shorthand: Maps to { scenario: value }.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "options": {
      "additionalProperties": false,
      "properties": {
        "cacheable": {
          "type": "boolean"
        },
        "context": {
          "type": "string"
        },
        "deepLocate": {
          "type": "boolean"
        },
        "deepThink": {
          "anyOf": [
            {
              "const": "unset"
            },
            {
              "type": "boolean"
            }
          ]
        },
        "effort": {
          "enum": [
            "fast",
            "balance",
            "deepThink"
          ]
        },
        "fileChooserAccept": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "fileChooserAllowedDir": {
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "scenario": {
      "format": "regex",
      "pattern": "\\S",
      "type": "string"
    }
  },
  "required": [
    "scenario"
  ],
  "type": "object"
}

setAIContext ​

Set or remove Agent-level AI guidance for subsequent calls on the same Agent.

String shorthand: Not supported by this Node.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "target": {
      "enum": [
        "default",
        "aiAct",
        "aiTap",
        "aiRightClick",
        "aiMiddleClick",
        "aiDoubleClick",
        "aiHover",
        "aiInput",
        "aiKeyboardPress",
        "aiScroll",
        "aiPinch",
        "aiLongPress",
        "aiClearInput",
        "aiLocate",
        "aiQuery",
        "aiBoolean",
        "aiNumber",
        "aiString",
        "aiAsk",
        "aiAssert",
        "aiWaitFor"
      ]
    }
  },
  "required": [
    "target"
  ],
  "type": "object"
}

setCookies ​

Title: Set browser cookies

Load cookies from an environment variable, configured profile, or browser storage-state file without persisting cookie values in workflow input or output.

String shorthand: Not supported by this Node.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "cookiesEnv": {
      "format": "regex",
      "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
      "type": "string"
    },
    "profile": {
      "format": "regex",
      "pattern": "\\S",
      "type": "string"
    },
    "storageStatePath": {
      "format": "regex",
      "pattern": "\\S",
      "type": "string"
    },
    "url": {
      "format": "uri",
      "type": "string"
    }
  },
  "required": [],
  "type": "object"
}

setViewportSize ​

Title: Set the browser viewport size

Set the current browser Page viewport size in CSS pixels and return the effective size.

String shorthand: Not supported by this Node.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "height": {
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "type": "integer"
    },
    "width": {
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "type": "integer"
    }
  },
  "required": [
    "width",
    "height"
  ],
  "type": "object"
}

sleep ​

Wait for a fixed number of milliseconds, recording standard UI snapshots and honoring cancellation.

String shorthand: Not supported by this Node.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "ms": {
      "exclusiveMinimum": 0,
      "type": "number"
    }
  },
  "required": [
    "ms"
  ],
  "type": "object"
}

todo.captureState ​

Title: Capture the current Todo state

Read the current TodoMVC DOM without asserting it, for lifecycle diagnostics and history.

String shorthand: Not supported by this Node.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {},
  "required": [],
  "type": "object"
}

todo.expectState ​

Title: Expect the exact Todo state

Read TodoMVC from the DOM and require the ordered titles and completed states to match exactly.

String shorthand: Not supported by this Node.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "items": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "completed": {
            "type": "boolean"
          },
          "title": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "title",
          "completed"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "items"
  ],
  "type": "object"
}

todo.seed ​

Title: Seed the Todo list

Create an ordered list of Todos through the visible input after todo.setup.

String shorthand: Not supported by this Node.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "items": {
      "items": {
        "minLength": 1,
        "type": "string"
      },
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "items"
  ],
  "type": "object"
}

todo.setup ​

Title: Prepare an empty TodoMVC page

Open React TodoMVC in All view, clear its storage, reload, and require an empty list before seeding.

String shorthand: Not supported by this Node.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {},
  "required": [],
  "type": "object"
}

wait ​

Wait for a fixed duration while honoring cancellation.

String shorthand: Not supported by this Node.

Input Schema ​

json
{
  "$schema": "https://json-schema.org/draft-2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "duration": {
      "exclusiveMinimum": 0,
      "type": "number"
    },
    "unit": {
      "default": "ms",
      "enum": [
        "ms",
        "s",
        "min"
      ]
    }
  },
  "required": [
    "duration"
  ],
  "type": "object"
}

内部文档,仅供测试团队使用