mcp
v0.10.0MCP server for Testplane tool
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
click
Click an element on the page.
| Parameter | Type | Description |
|---|---|---|
altText | string | Image alt attribute for testing-library getByAltText. |
displayValue | string | Current input display value for testing-library getByDisplayValue. |
exact | boolean | Whether to match text exactly (queryOptions.exact). |
hidden | boolean | Include elements hidden from the accessibility tree (queryOptions.hidden). |
labelText | string | Label text associated with a form input for testing-library getByLabelText. |
level | integer | Heading level modifier for role='heading' (queryOptions.level), 1-6. |
name | string | Accessible name modifier (queryOptions.name) for role queries. |
placeholderText | string | Input placeholder text for testing-library getByPlaceholderText. |
role | string | ARIA role for testing-library getByRole (e.g. "button", "heading", "link"). |
selector | string | CSS selector, XPath, or webdriverio locator. Mutually exclusive with testing-library query fields. |
testId | string | data-testid attribute for testing-library getByTestId. |
text | string | Visible text content for testing-library getByText. |
title | string | HTML title attribute for testing-library getByTitle. |
hover
Hover an element on the page.
| Parameter | Type | Description |
|---|---|---|
altText | string | Image alt attribute for testing-library getByAltText. |
displayValue | string | Current input display value for testing-library getByDisplayValue. |
exact | boolean | Whether to match text exactly (queryOptions.exact). |
hidden | boolean | Include elements hidden from the accessibility tree (queryOptions.hidden). |
labelText | string | Label text associated with a form input for testing-library getByLabelText. |
level | integer | Heading level modifier for role='heading' (queryOptions.level), 1-6. |
name | string | Accessible name modifier (queryOptions.name) for role queries. |
placeholderText | string | Input placeholder text for testing-library getByPlaceholderText. |
role | string | ARIA role for testing-library getByRole (e.g. "button", "heading", "link"). |
selector | string | CSS selector, XPath, or webdriverio locator. Mutually exclusive with testing-library query fields. |
testId | string | data-testid attribute for testing-library getByTestId. |
text | string | Visible text content for testing-library getByText. |
title | string | HTML title attribute for testing-library getByTitle. |
type
Type text into an element on the page.
| Parameter | Type | Description |
|---|---|---|
value * | string | The text value to type into the element |
altText | string | Image alt attribute for testing-library getByAltText. |
displayValue | string | Current input display value for testing-library getByDisplayValue. |
exact | boolean | Whether to match text exactly (queryOptions.exact). |
hidden | boolean | Include elements hidden from the accessibility tree (queryOptions.hidden). |
labelText | string | Label text associated with a form input for testing-library getByLabelText. |
level | integer | Heading level modifier for role='heading' (queryOptions.level), 1-6. |
name | string | Accessible name modifier (queryOptions.name) for role queries. |
placeholderText | string | Input placeholder text for testing-library getByPlaceholderText. |
role | string | ARIA role for testing-library getByRole (e.g. "button", "heading", "link"). |
selector | string | CSS selector, XPath, or webdriverio locator. Mutually exclusive with testing-library query fields. |
testId | string | data-testid attribute for testing-library getByTestId. |
text | string | Visible text content for testing-library getByText. |
title | string | HTML title attribute for testing-library getByTitle. |
select
Select an option in a native <select> element.
| Parameter | Type | Description |
|---|---|---|
altText | string | Image alt attribute for testing-library getByAltText. |
displayValue | string | Current input display value for testing-library getByDisplayValue. |
exact | boolean | Whether to match text exactly (queryOptions.exact). |
hidden | boolean | Include elements hidden from the accessibility tree (queryOptions.hidden). |
index | integer | Zero-based option index to select. Mutually exclusive with --visible-text and --value. |
labelText | string | Label text associated with a form input for testing-library getByLabelText. |
level | integer | Heading level modifier for role='heading' (queryOptions.level), 1-6. |
name | string | Accessible name modifier (queryOptions.name) for role queries. |
placeholderText | string | Input placeholder text for testing-library getByPlaceholderText. |
role | string | ARIA role for testing-library getByRole (e.g. "button", "heading", "link"). |
selector | string | CSS selector, XPath, or webdriverio locator. Mutually exclusive with testing-library query fields. |
testId | string | data-testid attribute for testing-library getByTestId. |
text | string | Visible text content for testing-library getByText. |
title | string | HTML title attribute for testing-library getByTitle. |
value | string | Option value attribute to select. Mutually exclusive with --visible-text and --index. |
visibleText | string | Option visible text to select. Mutually exclusive with --index and --value. |
wait
Wait for an element to appear or disappear on the page. Useful for waiting until page loads fully or loading spinners disappear.
| Parameter | Type | Description |
|---|---|---|
altText | string | Image alt attribute for testing-library getByAltText. |
disappear | boolean | Whether to wait for element to disappear. Default: false (wait for element to appear) |
displayValue | string | Current input display value for testing-library getByDisplayValue. |
exact | boolean | Whether to match text exactly (queryOptions.exact). |
hidden | boolean | Include elements hidden from the accessibility tree (queryOptions.hidden). |
includeSnapshotInResponse | boolean | Whether to include page snapshot in response. Default: true |
labelText | string | Label text associated with a form input for testing-library getByLabelText. |
level | integer | Heading level modifier for role='heading' (queryOptions.level), 1-6. |
name | string | Accessible name modifier (queryOptions.name) for role queries. |
placeholderText | string | Input placeholder text for testing-library getByPlaceholderText. |
role | string | ARIA role for testing-library getByRole (e.g. "button", "heading", "link"). |
selector | string | CSS selector, XPath, or webdriverio locator. Mutually exclusive with testing-library query fields. |
testId | string | data-testid attribute for testing-library getByTestId. |
text | string | Visible text content for testing-library getByText. |
timeout | number | Maximum time to wait in milliseconds. Default: 3000 |
title | string | HTML title attribute for testing-library getByTitle. |
snapshot
Capture a DOM snapshot of the current page. Note: by default, not useful tags and attributes are excluded (e.g. script, style, etc.). Prefer to use defaults. Response contains info as to what was omitted. If you need more info, request a snapshot with more tags and attributes.
| Parameter | Type | Description |
|---|---|---|
excludeAttrs | array | HTML attributes to exclude from the snapshot |
excludeTags | array | HTML tags to exclude from the snapshot |
includeAttrs | array | HTML attributes to include in the snapshot besides defaults |
includeTags | array | HTML tags to include in the snapshot besides defaults |
maxTextLength | number | Maximum length of text content before truncation |
truncateText | boolean | Whether to truncate long text content (default: true) |
screenshot
Capture a PNG screenshot of the current browser viewport. Strongly prefer capturing text-based snapshots using takePageSnapshot tool. Only use to test for visual changes when text-based snapshots are not useful.
| Parameter | Type | Description |
|---|---|---|
filePath | string | Path to save the screenshot (defaults to tmp directory) |
console
Get browser-side console messages. This command only works with Chromium-based browsers and returns only "unseen" messages - those that were not returned by the previous getLogs call in the current session.
network-list
List captured requests from the active browser session or a saved Time Travel recording
| Parameter | Type | Description |
|---|---|---|
attempt | integer | Attempt index to inspect. Defaults to the latest attempt for the selected test and browser |
browser | string | Browser id to inspect in report mode |
errors | boolean | Show HTTP 4xx/5xx responses and network failures |
json | boolean | Return structured JSON |
limit | integer | Maximum requests to show. 0 means all retained requests |
method | string | Filter by HTTP method, e.g. GET or POST |
name | string | Full test name to inspect in report mode |
report | string | Path or URL to a Testplane HTML report directory, report HTML file, or databaseUrls.json |
snapshotFile | string | Path or URL to a time travel snapshot zip. Mutually exclusive with report mode |
status | string | Filter by HTTP status codes or classes, e.g. 404 or 4xx,5xx |
type | string | Filter by comma-separated resource types, e.g. fetch,xhr |
url | string | Filter by a literal substring of the URL |
network-inspect
Inspect request and response metadata. Use network-body to read captured bodies
| Parameter | Type | Description |
|---|---|---|
requestId * | string | Request ID returned by network-list |
attempt | integer | Attempt index to inspect. Defaults to the latest attempt for the selected test and browser |
browser | string | Browser id to inspect in report mode |
json | boolean | Return structured JSON |
name | string | Full test name to inspect in report mode |
report | string | Path or URL to a Testplane HTML report directory, report HTML file, or databaseUrls.json |
snapshotFile | string | Path or URL to a time travel snapshot zip. Mutually exclusive with report mode |
network-body
Retrieve the complete captured response body, or the request body when requested
| Parameter | Type | Description |
|---|---|---|
requestId * | string | Request ID returned by network-list |
attempt | integer | Attempt index to inspect. Defaults to the latest attempt for the selected test and browser |
browser | string | Browser id to inspect in report mode |
name | string | Full test name to inspect in report mode |
output | string | Write the body to a file. Required for binary bodies |
report | string | Path or URL to a Testplane HTML report directory, report HTML file, or databaseUrls.json |
request | boolean | Retrieve the request body instead of the response body |
snapshotFile | string | Path or URL to a time travel snapshot zip. Mutually exclusive with report mode |
list-tabs
Get a list of all currently opened browser tabs with their URLs, titles, and active status
switch-tab
Switch to a specific browser tab by its number (starting from 1)
| Parameter | Type | Description |
|---|---|---|
tabNumber * | integer | The number of the tab to switch to (starting from 1) |
new-tab
Open a new browser tab, optionally navigate to a URL, and automatically switch to it
| Parameter | Type | Description |
|---|---|---|
url | string | Optional URL to navigate to in the new tab |
close-tab
Close a specific browser tab by its number (1-based), or close the current tab if no number is provided
| Parameter | Type | Description |
|---|---|---|
tabNumber | integer | The number of the tab to close (starting from 1). If not provided, closes the current tab |
launch
Launch a new browser session with custom desired capabilities. Avoid using this tool unless the user explicitly requests a custom browser configuration; browsers are launched automatically for commands like navigate to URL. Testplane can ONLY download Chrome and Firefox automatically, for other browsers you MUST ensure that driver is launched and provide it as custom gridUrl.
| Parameter | Type | Description |
|---|---|---|
desiredCapabilities | object | WebDriver desiredCapabilities that should be used when launching the browser. Example to launch Chrome with mobile emulation: {"browserName":"chrome","goog:chromeOptions":{"mobileEmulation":{"deviceMe… |
gridUrl | string | WebDriver endpoint to connect to. "local" (default) lets Testplane manage Chrome and Firefox automatically; set a Selenium grid URL only when you need other browsers. |
headless | boolean | Whether to run browser in headless mode. When omitted, preserves the current session mode (CLI defaults to headless on first launch; use "--headless false" for headful mode). |
windowSize | Browser window size to use for the session. Provide {"width": number, "height": number} or a string like "1280x720"; use null to reset to the default size. |
attach
Attach to existing browser session
| Parameter | Type | Description |
|---|---|---|
session * | object | Attach to browser json object from console after --keep-browser testplane run |
attach-repl
Attach to a running Testplane REPL session
| Parameter | Type | Description |
|---|---|---|
port * | integer | Testplane REPL TCP port |
host | string | Testplane REPL TCP host |
close-browser
Close the current browser session
save-state
Save the current browser state, including cookies and web storage, to a JSON file
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to the JSON file with saved browser state. Relative paths are resolved from the current working directory. |
cookies | boolean | Whether to include cookies in the saved state. Default: true |
localStorage | boolean | Whether to include localStorage in the saved state. Default: true |
sessionStorage | boolean | Whether to include sessionStorage in the saved state. Default: true |
restore-state
Restore browser state from a JSON file. By default the page is refreshed after restore so it can observe restored cookies and web storage.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to the JSON file with saved browser state. Relative paths are resolved from the current working directory. |
refresh | boolean | Whether to reload the current page after restoring state. Default: true. Reloading makes the page observe restored cookies and storage immediately. |
run-code
Run arbitrary Testplane script using the current browser, useful when other tools don't provide the functionality you need. Inline input may be code or a function that receives browser as its only argument. In REPL sessions, the code is passed directly to the Testplane REPL.
| Parameter | Type | Description |
|---|---|---|
code | string | JavaScript code to run. It may be an expression like "await browser.getUrl()" or a function like "(browser) => browser.getUrl()". |
file | string | Path to a JavaScript file to run instead of inline code |
test-results
Read a Testplane HTML report and list final-attempt test results with filters
| Parameter | Type | Description |
|---|---|---|
report * | string | Path or URL to a Testplane HTML report directory, report HTML file, or databaseUrls.json |
browser | string | Comma-separated browserId filter |
duration | string | Duration filter, for example >5s, >=100ms, <2s, or =500ms |
fields | string | Comma-separated output fields for text and saved JSON. Allowed: status, browser, attempt, duration, file, name, error, meta, skipOrMuteReason. Default: status,browser,attempt,duration,file,name,error |
file | string | File path mask. Supports simple glob masks such as src/** or *.test.js |
grep | string | Regex to match against the full test name |
grepError | string | Regex to match against error text |
limit | integer | Maximum number of test results to print in text output. Default: 100, max: 500 |
meta | array | Meta filters in key=value form. Can be repeated |
offset | integer | Number of matched test results to skip before listing in text output |
saveJson | boolean | Save the whole filtered report as JSON without pagination to a file under os.tmpdir()/testplane-cli, then print the path, summary, and example file fragment. Useful for saving output to a file for lat… |
status | string | Comma-separated status filter. Allowed: passed, failed, muted, retried, skipped. failed includes error and fail report statuses. |
inspect-result
Read a Testplane HTML report and inspect test result attempt details as JSON
| Parameter | Type | Description |
|---|---|---|
browser * | string | Browser id to inspect |
name * | string | Full test name to inspect |
report * | string | Path or URL to a Testplane HTML report directory, report HTML file, or databaseUrls.json |
attempt | integer | Attempt index to inspect. When omitted, all attempts for the selected test and browser are returned |
includeBase64 | boolean | Include base64 image payloads in result images and errors. Omitted by default to keep output compact |
pretty | boolean | Pretty-print JSON output. Use --no-pretty for compact JSON |
time-travel-snapshot
Inspect Testplane Time Travel rrweb snapshot at a selected time and return a DOM snapshot of the replayed page, optionally with a diff from a previous time
| Parameter | Type | Description |
|---|---|---|
attempt | integer | Attempt index to inspect. Defaults to the latest attempt for the selected test and browser |
browser | string | Browser id to inspect in report mode |
diffFrom | number | When set, return only current DOM nodes that changed between this time and the requested time. Uses the same offset/timestamp rules as time |
excludeAttrs | array | HTML attributes to exclude from the snapshot |
excludeTags | array | HTML tags to exclude from the snapshot |
includeAttrs | array | HTML attributes to include in the snapshot besides defaults |
includeTags | array | HTML tags to include in the snapshot besides defaults |
maxTextLength | number | Maximum length of text content before truncation |
name | string | Full test name to inspect in report mode |
report | string | Path or URL to a Testplane HTML report directory, report HTML file, or databaseUrls.json |
snapshotFile | string | Path or URL to a time travel snapshot zip. Mutually exclusive with report mode |
time | number | Time to inspect in milliseconds. Values within snapshot duration are offsets from the first rrweb event; larger values are absolute timestamps |
truncateText | boolean | Whether to truncate long text content (default: true) |
time-travel-export-html
Export a Testplane Time Travel rrweb snapshot at a selected time as a browser-openable HTML file with captured inline styles
| Parameter | Type | Description |
|---|---|---|
attempt | integer | Attempt index to inspect. Defaults to the latest attempt for the selected test and browser |
browser | string | Browser id to inspect in report mode |
filePath | string | Path to save the exported HTML file. Defaults to os.tmpdir()/.testplane/time-travel-snapshots |
name | string | Full test name to inspect in report mode |
report | string | Path or URL to a Testplane HTML report directory, report HTML file, or databaseUrls.json |
snapshotFile | string | Path or URL to a time travel snapshot zip. Mutually exclusive with report mode |
time | number | Time to inspect in milliseconds. Values within snapshot duration are offsets from the first rrweb event; larger values are absolute timestamps |