web_wait_for
웹 자동화 · macOS · Windows
효과: 쓰기. 상태: 조건부 제공.
‘조건부 제공’은 도구가 버전, 플랫폼, 권한, 계정 또는 설정에 따라 달라질 수 있음을 뜻하며 모든 설치에서 활성화되었다는 의미는 아닙니다.
macOS
목적
페이지에 요소가 나타날 때까지 대기하거나(고정된 sleep이 아니라 폴링) 시간 초과가 될 때까지 기다립니다. 로드 후 하이드레이션되는 SPA 페이지에 사용하세요. `selector`(CSS 선택자, 예: "input[name=password]")를 우선 사용하세요. `condition`은 "document.querySelector('...')" 형식도 허용하며, 그 외의 JavaScript 조건은 페이지에서 임의의 코드를 실행하므로(web_eval과 같은 권한) confirm=true가 필요하고, 없으면 아무것도 실행하지 않는 미리보기를 반환합니다. LMCP가 읽기 전용 모드이면 비활성화됩니다. met:true/false를 반환합니다.
필수 입력
이 플랫폼의 스키마에는 필수 입력이 선언되어 있지 않습니다. 선택 항목이나 실행 요구 사항은 여전히 있을 수 있습니다.
권한 및 확인
스키마에 명시적 확인 매개변수가 있습니다. 미리보기를 검토하고 플랫폼 계약에 따라 실제 작업을 승인하세요.
- 이 플랫폼에서는 사용자가 승인한 앱, 계정 및 리소스만 사용하세요. 연결 및 권한 요구 사항은 이 도구의 플랫폼별 설명을 참조하세요. 이 카탈로그는 추가 OAuth 범위나 OS 권한이 있다고 주장하지 않습니다.
영문 정식 기술 스키마 — macOS
{
"properties": {
"condition": {
"description": "Alternative to selector: \"document.querySelector('...')\" is accepted as-is; any other JS expression runs arbitrary code on the page (same power as web_eval).",
"type": "string"
},
"confirm": {
"description": "Must be true to run a `condition` that is arbitrary JavaScript. Without it, returns a preview and runs nothing. Not needed for `selector` or the document.querySelector('...') form.",
"type": "boolean"
},
"selector": {
"description": "CSS selector to wait for (preferred; treated as data, never executed). e.g. .feed",
"type": "string"
},
"session": {
"description": "Session name (default 'default').",
"type": "string"
},
"timeout_seconds": {
"description": "Max seconds to wait (default 15).",
"type": "integer"
}
},
"required": [],
"type": "object"
}문서 예시
web_wait_for 문서 예시입니다. 이 예시를 실행하지 마세요. 표시된 인수는 가상 데이터 세트에 속합니다. 실제 호출 전에 실제 식별자를 확인하고 승인을 받으세요.
{
"confirm": false,
"selector": "h1",
"session": "demo-browser"
}Windows
목적
요소가 나타날 때까지(또는 페이지 조건이 충족될 때까지) 대기하거나(고정된 sleep이 아니라 폴링) 시간 초과가 될 때까지 기다립니다. `selector` 매개변수를 우선 사용하세요. 데이터로 대기하는 CSS 선택자입니다(예: selector "input[name=password]"). `condition`은 호환성을 위해 문서화된 형식 "document.querySelector('SEL')"도 허용하며, 그 외에 페이지에서 평가할 모든 JavaScript도 허용하지만 이 경우 confirm=true가 필요합니다(없으면 아무것도 실행하지 않는 미리보기를 반환). met:true/false를 반환합니다.
필수 입력
이 플랫폼의 스키마에는 필수 입력이 선언되어 있지 않습니다. 선택 항목이나 실행 요구 사항은 여전히 있을 수 있습니다.
권한 및 확인
스키마에 명시적 확인 매개변수가 있습니다. 미리보기를 검토하고 플랫폼 계약에 따라 실제 작업을 승인하세요.
- 이 플랫폼에서는 사용자가 승인한 앱, 계정 및 리소스만 사용하세요. 연결 및 권한 요구 사항은 이 도구의 플랫폼별 설명을 참조하세요. 이 카탈로그는 추가 OAuth 범위나 OS 권한이 있다고 주장하지 않습니다.
영문 정식 기술 스키마 — Windows
{
"properties": {
"condition": {
"description": "Alternative to selector: \"document.querySelector('SEL')\" (compat), or any other JavaScript.",
"type": "string"
},
"confirm": {
"description": "Must be true to run a `condition` that is arbitrary JavaScript. Without it, returns a preview and runs nothing. Not needed for `selector` or the document.querySelector('SEL') form.",
"type": "boolean"
},
"selector": {
"description": "CSS selector to wait for (preferred; treated as data, never executed). e.g. .feed, input[name=password]",
"type": "string"
},
"session": {
"description": "Session name (default 'default').",
"type": "string"
},
"timeout_seconds": {
"description": "Max seconds to wait (default 15).",
"type": "integer"
}
},
"required": [],
"type": "object"
}문서 예시
web_wait_for 문서 예시입니다. 이 예시를 실행하지 마세요. 표시된 인수는 가상 데이터 세트에 속합니다. 실제 호출 전에 실제 식별자를 확인하고 승인을 받으세요.
{
"confirm": false,
"selector": "h1",
"session": "demo-browser"
}