Skip to main content
Glama

Better Playwright MCP

by livoras

waitForSelector

Use this tool to pause execution until a specified element appears on a webpage, defined by a CSS or XPath selector. Set timeout and state conditions such as 'visible' or 'hidden' to control when to proceed.

Instructions

等待指定选择器的元素出现

Input Schema

NameRequiredDescriptionDefault
pageIdYes页面ID
selectorYesCSS选择器或xp引用值
stateNo等待的状态(默认visible)
timeoutNo超时时间(毫秒,默认30000)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "pageId": { "description": "页面ID", "type": "string" }, "selector": { "description": "CSS选择器或xp引用值", "type": "string" }, "state": { "description": "等待的状态(默认visible)", "enum": [ "attached", "detached", "visible", "hidden" ], "type": "string" }, "timeout": { "description": "超时时间(毫秒,默认30000)", "type": "number" } }, "required": [ "pageId", "selector" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/livoras/better-playwright-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server