Browser Automation
Full web automation: navigation, interaction, data extraction, screenshots, and performance monitoring.
38 modules
| Module | Description |
|---|---|
| クリック | ページ上の要素をクリック |
| ブラウザを閉じる | ブラウザを閉じてリソースを解放 |
| コンソール取得 | ブラウザコンソールログを取得 |
| Cookie 管理 | Cookie の取得・設定・削除 |
| ダイアログ処理 | alert・confirm・prompt ダイアログの処理 |
| ダウンロード | ブラウザからファイルをダウンロード |
| ドラッグ&ドロップ | 要素をドラッグ&ドロップ |
| デバイスエミュレート | デバイスをエミュレートまたはカスタムビューポートを設定 |
| ブラウザ確認 | ブラウザセッションが存在することを確認(再利用または起動) |
| JavaScript 実行 | ページ上でJavaScriptコードを実行 |
| データ抽出 | ページから構造化データを抽出 |
| 要素検索 | ページ内の要素を検索し要素ID一覧を返す |
| フォーム入力 | 自動フィールド検出によるスマートフォーム入力 |
| フレーム切替 | iframe またはフレームに切り替え |
| 位置情報シミュレート | ブラウザの位置情報をシミュレート |
| URLに移動 | 指定URLに移動 |
| ホバー | 要素にマウスオーバー |
| ブラウザ起動 | Playwright で新しいブラウザを起動 |
| 履歴ナビゲート | ブラウザ履歴をナビゲート(戻る、進む、リロード) |
| ネットワーク監視 | ネットワークリクエストの監視・傍受 |
| ページ一覧 | 開いているすべてのブラウザページ/タブを一覧表示 |
| ページネート&抽出 | ページを自動でページネートし、データを抽出 |
| PDF生成 | 現在のページからPDFを生成 |
| パフォーマンス指標 | ブラウザのパフォーマンス指標を収集 |
| キー入力 | キーボードキーを押す |
| 操作記録 | ユーザー操作をワークフローとして記録 |
| ブラウザを解放 | ブラウザセッションを解放(所有している場合のみ閉じる) |
| スクリーンショット | 現在のページのスクリーンショットを撮影 |
| スクロール | 要素・位置・方向にスクロール |
| 選択 | ドロップダウンから選択 |
| DOMスナップショット | 現在のページのDOMスナップショットをキャプチャ |
| ストレージ | localStorage・sessionStorage にアクセス |
| タブ管理 | タブの作成・切替・閉じる |
| ブラウザトレース | ブラウザのパフォーマンストレースを開始、停止、または保存 |
| テキスト入力 | 入力フィールドにテキストを入力 |
| ファイルアップロード | ファイル入力要素にファイルをアップロード |
| ビューポート設定 | ブラウザのビューポートサイズを取得または設定 |
| 待機 | 一定時間または要素が表示されるまで待機 |
Modules
クリック
browser.click
ページ上の要素をクリック
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
click_method | select (text, button, id, selector) | No | text | Choose the easiest way to identify the element you want to click |
target | string | No | - | e.g. "Submit", "Next Page", "Login" |
selector | string | No | - | CSS selector, XPath, or text selector |
button | select (left, right, middle) | No | left | Which mouse button to use for clicking |
click_count | number | No | 1 | Number of clicks (2 for double-click, 3 for triple-click) |
force | boolean | No | False | Force click even if element is not actionable (covered, invisible) |
modifiers | array | No | - | Modifier keys to hold during click |
timeout | number | No | 30000 | Maximum time to wait in milliseconds |
Output:
| Field | Type | Description |
|---|---|---|
browser | object | Browser session (pass-through for chaining) |
status | string | 操作ステータス |
selector | string | クリックされたセレクター |
method | string | Click method used |
Example: Example
click_method: text
target: SubmitExample: Example
click_method: id
target: login-buttonExample: Example
click_method: selector
selector: #submit-buttonブラウザを閉じる
browser.close
ブラウザを閉じてリソースを解放
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
_no_params | boolean | No | True | This module requires no parameters |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
message | string | 終了結果メッセージ |
Example: Example
コンソール取得
browser.console
ブラウザコンソールログを取得
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
level | select (all, error, warning, info, log) | No | all | Filter console messages by level |
timeout | number | No | 5000 | Maximum time to wait in milliseconds |
clear_existing | boolean | No | False | Clear existing messages before capturing |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
messages | array | コンソールメッセージ一覧 |
count | number | ログ件数 |
Example: Example
timeout: 3000Example: Example
level: error
timeout: 5000Cookie 管理
browser.cookies
Cookie の取得・設定・削除
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | select (get, set, clear, delete) | Yes | - | Action to perform on the storage |
name | string | No | - | Name of the cookie |
value | string | No | - | Value of the cookie |
domain | string | No | - | Cookie domain |
path | string | No | / | Cookie path |
secure | boolean | No | False | Whether cookie is secure (HTTPS only) |
httpOnly | boolean | No | False | Whether cookie is HTTP only |
expires | number | No | - | Cookie expiration time (Unix timestamp) |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
cookies | array | Cookie 一覧 |
count | number | Cookie 件数 |
Example: Example
action: getExample: Example
action: get
name: session_idExample: Example
action: set
name: user_pref
value: dark_mode
domain: example.comExample: Example
action: clearダイアログ処理
browser.dialog
alert・confirm・prompt ダイアログの処理
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | select (accept, dismiss, listen) | Yes | - | How to respond to the dialog |
prompt_text | string | No | - | Text to enter in prompt dialog (for accept action) |
timeout | number | No | 30000 | Maximum time to wait in milliseconds |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
message | string | ダイアログメッセージ |
type | string | ダイアログタイプ |
default_value | string | ダイアログのデフォルト値 |
Example: Example
action: acceptExample: Example
action: dismissExample: Example
action: accept
prompt_text: Hello WorldExample: Example
action: listen
timeout: 5000ダウンロード
browser.download
ブラウザからファイルをダウンロード
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
selector | string | No | - | CSS selector, XPath, or text selector to find the element |
save_path | string | Yes | - | Path where to save the downloaded file |
timeout_ms | number | No | 60000 | Maximum time to wait in milliseconds |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
path | string | ファイルパス |
filename | string | ファイル名 |
size | number | ファイルサイズ |
Example: Example
selector: #download-btn
save_path: /downloads/report.pdfExample: Example
selector: a.download
save_path: /downloads/large-file.zip
timeout_ms: 120000ドラッグ&ドロップ
browser.drag
要素をドラッグ&ドロップ
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
source | string | Yes | - | CSS selector, XPath, or text selector to find the element |
target | string | Yes | - | CSS selector, XPath, or text selector to find the element |
source_position | object | No | - | Position within source element {x, y} as percentages |
target_position | object | No | - | Position within target element {x, y} as percentages |
timeout | number | No | 30000 | Maximum time to wait in milliseconds |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
source | string | ソース要素位置 |
target | string | ターゲット要素位置 |
Example: Example
source: #item1
target: #dropzoneExample: Example
source: .draggable
target: .container
target_position: {"x": 0.5, "y": 0.5}デバイスエミュレート
browser.emulate
デバイスをエミュレートまたはカスタムビューポートを設定
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
device | select (iphone_12, iphone_14, iphone_14_pro_max, iphone_se, pixel_7, pixel_5, galaxy_s21, galaxy_s23, ipad_pro, ipad_mini, galaxy_tab_s8, desktop_chrome, desktop_firefox, desktop_safari, desktop_edge, laptop, macbook_pro, custom) | Yes | - | エミュレートするデバイス名(例:iPhone 13) |
width | number | No | - | ビューポートの幅(ピクセル) |
height | number | No | - | ビューポートの高さ(ピクセル) |
user_agent | string | No | - | カスタムユーザーエージェント文字列 |
is_mobile | boolean | No | - | モバイルデバイスをエミュレートするかどうか |
has_touch | boolean | No | - | デバイスにタッチサポートがあるかどうか |
device_scale_factor | number | No | - | デバイスピクセル比 |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス(成功/エラー) |
device | string | エミュレートされたデバイス名 |
viewport | object | 現在のビューポート寸法 |
is_mobile | boolean | モバイルエミュレーションが有効かどうか |
Example: Example
device: iphone_14Example: Example
device: ipad_proExample: Example
device: custom
width: 400
height: 800
is_mobile: true
has_touch: true
device_scale_factor: 2Example: Example
device: desktop_chrome
user_agent: CustomBot/1.0ブラウザ確認
browser.ensure
ブラウザセッションが存在することを確認(再利用または起動)
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
headless | boolean | No | False | Run browser without visible window |
width | number | No | 1280 | Browser viewport width in pixels |
height | number | No | 720 | Browser viewport height in pixels |
Output:
| Field | Type | Description |
|---|---|---|
status | string | ブラウザが起動または再利用されたかどうか |
message | string | ブラウザが起動または再利用されたかどうか |
is_owner | boolean | ブラウザが起動または再利用されたかどうか |
Example: Example
headless: falseExample: Example
headless: trueJavaScript 実行
browser.evaluate
ページ上でJavaScriptコードを実行
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
script | string | Yes | - | JavaScript code to execute (can use return statement) |
args | array | No | - | Arguments to pass to the script function |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
result | any | 実行結果 |
Example: Example
script: return document.titleExample: Example
script: return document.querySelectorAll("a").lengthExample: Example
script: (selector) => document.querySelector(selector)?.textContent
args: ["#header"]Example: Example
script: document.body.style.backgroundColor = "red"; return "done"データ抽出
browser.extract
ページから構造化データを抽出
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
selector | string | Yes | - | CSS selector, XPath, or text selector to find the element |
limit | number | No | - | Maximum number of items to extract |
fields | object | No | - | Define fields to extract from each item |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
data | array | 抽出データ |
count | number | 抽出件数 |
Example: Example
selector: .g
limit: 10
fields: {"title": {"selector": "h3", "type": "text"}, "url": {"selector": "a", "type": "attribute", "attribute": "href"}}要素検索
browser.find
ページ内の要素を検索し要素ID一覧を返す
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
selector | string | Yes | - | CSS selector, XPath, or text selector to find the element |
limit | number | No | - | Maximum number of items to extract |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
count | number | 見つかった要素数 |
element_ids | array | 要素ID一覧 |
Example: Find search results
selector: div.tF2Cxc
limit: 10フォーム入力
browser.form
自動フィールド検出によるスマートフォーム入力
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
form_selector | string | No | - | CSS selector for the form element (optional) |
data | object | Yes | - | Key-value pairs to fill (key = field name/id, value = content) |
field_mapping | object | No | - | Custom selector mapping |
clear_before_fill | boolean | No | True | Clear existing field values before filling |
submit | boolean | No | False | Submit form after filling |
submit_selector | string | No | - | CSS selector for submit button |
delay_between_fields_ms | number | No | 100 | Delay between filling each field (for more human-like behavior) |
Output:
| Field | Type | Description |
|---|---|---|
filled_fields | array | 各フィールド入力間の遅延(より人間らしい動作のため) |
failed_fields | array | 入力されたフィールドのリスト |
submitted | boolean | 入力されたフィールドのリスト |
Example: Example
data: {"email": "user@example.com", "password": "secret123"}
submit: trueExample: Example
data: {"username": "john_doe", "bio": "Hello world"}
field_mapping: {"username": "#user-name-input", "bio": "textarea.bio-field"}フレーム切替
browser.frame
iframe またはフレームに切り替え
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
selector | string | No | - | CSS selector, XPath, or text selector to find the element |
name | string | No | - | Name attribute of the frame (alternative to selector) |
url | string | No | - | URL pattern to match frame (alternative to selector) |
action | string | No | enter | Frame action to perform |
timeout | number | No | 30000 | Maximum time to wait in milliseconds |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
frame_url | string | フレームURL |
frame_name | string | フレーム名 |
frames | array | フレーム一覧 |
Example: Example
selector: iframe#content-frameExample: Example
name: main-contentExample: Example
action: exitExample: Example
action: list位置情報シミュレート
browser.geolocation
ブラウザの位置情報をシミュレート
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
latitude | number | Yes | - | Latitude coordinate (-90 to 90) |
longitude | number | Yes | - | Longitude coordinate (-180 to 180) |
accuracy | number | No | 100 | Position accuracy in meters |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
location | object | 位置情報 |
Example: Example
latitude: 37.7749
longitude: -122.4194Example: Example
latitude: 51.5074
longitude: -0.1278
accuracy: 10Example: Example
latitude: 35.6762
longitude: 139.6503URLに移動
browser.goto
指定URLに移動
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | - | URL to navigate to |
wait_until | select (load, domcontentloaded, networkidle) | No | domcontentloaded | When to consider navigation complete |
timeout_ms | number | No | 30000 | Maximum time to wait in milliseconds |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
url | string | 実際に開いたURL |
Example: Example
url: https://www.google.com
wait_until: domcontentloadedホバー
browser.hover
要素にマウスオーバー
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
selector | string | Yes | - | CSS selector, XPath, or text selector to find the element |
timeout_ms | number | No | 30000 | Maximum time to wait in milliseconds |
position | object | No | - | Click position relative to element (0-1 range) |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
selector | string | ホバーしたセレクター |
Example: Example
selector: .menu-itemExample: Example
selector: #dropdown-trigger
timeout_ms: 5000ブラウザ起動
browser.launch
Playwright で新しいブラウザを起動
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
headless | boolean | No | False | Run browser without visible window |
width | number | No | 1280 | Browser viewport width in pixels |
height | number | No | 720 | Browser viewport height in pixels |
browser_type | select (chromium, firefox, webkit) | No | chromium | 使用するブラウザエンジン(chromium、firefox、webkit) |
proxy | string | No | - | プロキシサーバーのURL |
user_agent | string | No | - | カスタムユーザーエージェント文字列 |
locale | string | No | en-US | Browser locale (e.g. en-US, zh-TW, ja-JP) |
slow_mo | number | No | 0 | 指定されたミリ秒で操作を遅くする |
record_video_dir | string | No | - | Directory to save recorded videos (enables Playwright video recording) |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
message | string | 起動結果メッセージ |
browser_type | string | 起動したブラウザのタイプ |
headless | boolean | ブラウザがヘッドレスで実行されているかどうか |
viewport | object | 現在のビューポート寸法 |
Example: Example
headless: trueExample: Example
headless: false履歴ナビゲート
browser.navigation
ブラウザ履歴をナビゲート(戻る、進む、リロード)
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | select (back, forward, reload) | Yes | reload | Which navigation action to perform |
wait_until | select (load, domcontentloaded, networkidle) | No | domcontentloaded | When to consider navigation complete |
timeout_ms | number | No | 30000 | Maximum time to wait in milliseconds |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス(成功/エラー) |
action | string | 実行されたナビゲーションアクション |
url | string | ナビゲーション後の現在のURL |
Example: Example
action: backExample: Example
action: forwardExample: Example
action: reload
wait_until: networkidleネットワーク監視
browser.network
ネットワークリクエストの監視・傍受
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | select (monitor, block, intercept) | Yes | - | Network action to perform |
url_pattern | string | No | - | Regex pattern to match request URLs |
resource_type | string | No | - | Filter by resource type (document, script, image, etc) |
timeout | number | No | 30000 | Maximum time to wait in milliseconds |
mock_response | object | No | - | Response to return for intercepted requests |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
requests | array | リクエスト一覧 |
blocked_count | number | ブロック件数 |
Example: Example
action: monitor
url_pattern: .*api.*
timeout: 10000Example: Example
action: block
resource_type: imageExample: Example
action: intercept
url_pattern: .*users.*
mock_response: {"status": 200, "body": "{\"users\": []}"}ページ一覧
browser.pages
開いているすべてのブラウザページ/タブを一覧表示
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
include_details | boolean | No | True | 各ページの詳細情報を含める |
include_content_info | boolean | No | False | 各ページのコンテンツタイプ情報を含める |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス(成功/エラー) |
pages | array | 開いているページの一覧 |
count | number | 開いているページの数 |
current_index | number | 現在アクティブなページのインデックス |
Example: Example
include_details: trueExample: Example
include_details: falseExample: Example
include_details: true
include_content_info: trueページネート&抽出
browser.pagination
ページを自動でページネートし、データを抽出
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
mode | select (next_button, infinite_scroll, page_numbers, load_more) | No | next_button | How to navigate between pages |
item_selector | string | Yes | - | CSS selector for items to extract on each page |
fields | object | No | - | Field definitions {name: {selector, attribute?}} |
next_selector | string | No | - | CSS selector for next page button |
load_more_selector | string | No | - | CSS selector for load more button |
max_pages | number | No | 10 | Maximum number of pages to process (0 = unlimited) |
max_items | number | No | 0 | Stop after collecting this many items (0 = unlimited) |
wait_between_pages_ms | number | No | 1000 | Wait time between page navigations |
wait_for_selector | string | No | - | Wait for this element after page change |
scroll_amount | number | No | 1000 | Pixels to scroll for infinite scroll mode |
no_more_indicator | string | No | - | Selector that appears when no more pages (stops pagination) |
Output:
| Field | Type | Description |
|---|---|---|
items | array | ページがなくなったときに表示されるセレクタ(ページネーション停止) |
total_items | integer | すべてのページから抽出されたアイテム |
pages_processed | integer | すべてのページから抽出されたアイテム |
stopped_reason | string | 処理されたページ数 |
Example: Example
mode: next_button
item_selector: .product-card
fields: {"title": {"selector": ".title"}, "price": {"selector": ".price"}, "link": {"selector": "a", "attribute": "href"}}
next_selector: .pagination .next
max_pages: 5Example: Example
mode: infinite_scroll
item_selector: .feed-item
fields: {"content": {"selector": ".content"}, "author": {"selector": ".author"}}
max_items: 100
no_more_indicator: .end-of-feedExample: Example
mode: load_more
item_selector: .list-item
load_more_selector: button.load-more
max_pages: 10PDF生成
browser.pdf
現在のページからPDFを生成
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | No | - | Path where the output file will be saved |
page_size | select (A4, Letter, Legal, A3, A5) | No | A4 | Page size format |
orientation | select (portrait, landscape) | No | portrait | Page orientation |
print_background | boolean | No | True | Include background graphics |
scale | number | No | 1 | Scale of the webpage rendering (0.1-2) |
margin | number | No | 20 | Page margin in millimeters |
header | string | No | - | Header text for each page |
footer | string | No | - | Footer text for each page |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
path | string | PDFファイルパス |
size | number | PDFファイルサイズ |
Example: Example
path: /output/page.pdfExample: Example
path: /output/landscape.pdf
landscape: trueExample: Example
path: /output/custom.pdf
margin: {"top": "1cm", "bottom": "1cm", "left": "2cm", "right": "2cm"}パフォーマンス指標
browser.performance
ブラウザのパフォーマンス指標を収集
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
metrics | array | No | ['all'] | 収集するパフォーマンス指標 |
timeout_ms | number | No | 3000 | タイムアウト(ミリ秒) |
setup_observers | boolean | No | True | 収集前にパフォーマンスオブザーバーを設定 |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス(成功/エラー) |
metrics | object | 収集されたパフォーマンス指標 |
Example: Example
metrics: ["all"]
timeout_ms: 5000Example: Example
metrics: ["lcp", "fcp", "cls"]Example: Example
metrics: ["ttfb", "domContentLoaded", "load"]
timeout_ms: 0キー入力
browser.press
キーボードキーを押す
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
key | string | Yes | - | The key to press (e.g., Enter, Escape, Tab) |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
key | string | 押されたキー |
Example: Example
key: EnterExample: Example
key: Escape操作記録
browser.record
ユーザー操作をワークフローとして記録
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | - | Recording action to perform |
output_format | string | No | yaml | Format for recorded workflow |
output_path | string | No | - | Path where the output file will be saved |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
recording | array | 記録状態 |
workflow | string | 記録されたワークフロー |
Example: Example
action: startExample: Example
action: stop
output_format: yamlExample: Example
action: getブラウザを解放
browser.release
ブラウザセッションを解放(所有している場合のみ閉じる)
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
force | boolean | No | False | このテンプレートが所有していなくてもブラウザを閉じる |
Output:
| Field | Type | Description |
|---|---|---|
status | string | このテンプレートが所有していなくてもブラウザを閉じる |
message | string | 実行されたアクション |
was_owner | boolean | 実行されたアクション |
Example: Example
Example: Example
force: trueスクリーンショット
browser.screenshot
現在のページのスクリーンショットを撮影
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | No | screenshot.png | Path where the output file will be saved |
full_page | boolean | No | False | Capture the entire scrollable page |
format | select (png, jpeg, webp) | No | png | Image format for the screenshot |
quality | number | No | - | Quality for JPEG/WebP format (0-100) |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
filepath | string | ファイルパス |
Example: Example
path: output/page.pngスクロール
browser.scroll
要素・位置・方向にスクロール
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
selector | string | No | - | CSS selector, XPath, or text selector to find the element |
direction | select (down, up, left, right) | No | down | Direction to scroll the page |
amount | number | No | 500 | Pixels to scroll (ignored if selector is provided) |
behavior | select (smooth, instant) | No | smooth | How the scroll animation behaves |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
scrolled_to | object | スクロール位置 |
Example: Example
selector: #footerExample: Example
direction: down
amount: 500Example: Example
direction: up
amount: 10000
behavior: smooth選択
browser.select
ドロップダウンから選択
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
selector | string | Yes | - | CSS selector, XPath, or text selector to find the element |
value | string | No | - | Option value attribute to select |
label | string | No | - | Option text content to select (alternative to value) |
index | number | No | - | Option index to select (0-based) |
timeout | number | No | 30000 | Maximum time to wait in milliseconds |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
selected | array | 選択された値 |
selector | string | セレクター |
Example: Example
selector: select#country
value: usExample: Example
selector: select#country
label: United StatesExample: Example
selector: select#country
index: 2DOMスナップショット
browser.snapshot
現在のページのDOMスナップショットをキャプチャ
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
format | select (html, mhtml, text) | No | html | 出力形式(htmlまたはtext) |
selector | string | No | - | 特定の要素をスナップショットするためのCSSセレクタ |
path | string | No | - | スナップショットを保存するパス |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス(成功/エラー) |
format | string | スナップショットの形式 |
content | string | スナップショットの内容 |
path | string | スナップショットが保存されたパス |
size_bytes | number | スナップショットのサイズ(バイト) |
Example: Example
format: htmlExample: Example
format: mhtml
path: /tmp/page.mhtmlExample: Example
format: text
selector: article.main-contentExample: Example
format: html
selector: #main
path: /tmp/section.htmlストレージ
browser.storage
localStorage・sessionStorage にアクセス
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | select (get, set, remove, clear, keys, length) | Yes | - | Action to perform on the storage |
type | select (local, session) | No | local | Browser storage type to access |
key | string | No | - | Storage key |
value | string | No | - | Value to store |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
value | any | 取得した値 |
keys | array | キー一覧 |
length | number | 項目数 |
Example: Example
action: get
type: local
key: user_tokenExample: Example
action: set
type: session
key: temp_data
value: {"id": 123}Example: Example
action: clear
type: localExample: Example
action: keys
type: localタブ管理
browser.tab
タブの作成・切替・閉じる
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | - | Tab action to perform |
url | string | No | - | URL to navigate to |
index | number | No | - | Tab index to switch to or close (0-based) |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
tab_count | number | タブ総数 |
current_index | number | 現在のタブインデックス |
tabs | array | タブ一覧 |
Example: Example
action: new
url: https://example.comExample: Example
action: switch
index: 0Example: Example
action: closeExample: Example
action: listブラウザトレース
browser.trace
ブラウザのパフォーマンストレースを開始、停止、または保存
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | - | トレースアクション(開始、停止、保存) |
categories | array | No | ['devtools.timeline'] | キャプチャするトレースカテゴリ |
screenshots | boolean | No | True | トレースにスクリーンショットを含める |
path | string | No | - | トレースファイルを保存するパス |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス(成功/エラー) |
tracing | boolean | トレースが現在アクティブかどうか |
path | string | トレースが保存されたパス |
size_bytes | number | トレースファイルのサイズ(バイト) |
Example: Example
action: start
screenshots: trueExample: Example
action: start
categories: ["devtools.timeline", "v8.execute"]
screenshots: falseExample: Example
action: stop
path: /tmp/performance-trace.jsonテキスト入力
browser.type
入力フィールドにテキストを入力
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
type_method | select (placeholder, label, name, id, selector) | No | placeholder | Choose the easiest way to identify the input field |
target | string | No | - | e.g. "Enter your email", "Email", "username" |
selector | string | No | - | CSS selector, XPath, or text selector |
input_type | select (text, password, email) | No | text | Type of input field — use Password to mask the value in the builder |
text | string | Yes | - | |
sensitive_text | string | Yes | - | |
delay | number | No | 0 | Delay between keystrokes in milliseconds |
clear | boolean | No | False | Clear the input field before typing |
timeout | number | No | 30000 | Maximum time to wait in milliseconds |
Output:
| Field | Type | Description |
|---|---|---|
browser | object | Browser session (pass-through for chaining) |
status | string | 操作ステータス |
selector | string | 入力セレクター |
method | string | Type method used |
Example: Example
type_method: placeholder
target: Enter your email
text: user@example.comExample: Example
type_method: label
target: Email
text: user@example.comExample: Example
type_method: placeholder
target: Password
input_type: password
sensitive_text: ${env.LOGIN_PASSWORD}Example: Example
type_method: selector
selector: #email
text: user@example.comファイルアップロード
browser.upload
ファイル入力要素にファイルをアップロード
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
selector | string | Yes | - | CSS selector, XPath, or text selector to find the element |
file_path | string | Yes | - | Local path to the file to upload |
timeout_ms | number | No | 30000 | Maximum time to wait in milliseconds |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
filename | string | ファイル名 |
size | number | ファイルサイズ |
selector | string | セレクター |
Example: Example
selector: input[type="file"]
file_path: /path/to/image.pngExample: Example
selector: #file-upload
file_path: /path/to/document.pdfビューポート設定
browser.viewport
ブラウザのビューポートサイズを取得または設定
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
width | number | Yes | 1280 | ビューポートの幅(ピクセル) |
height | number | Yes | 720 | ビューポートの高さ(ピクセル) |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス(成功/エラー) |
viewport | object | 現在のビューポート寸法 |
previous_viewport | object | 以前のビューポート寸法 |
Example: Example
width: 375
height: 667Example: Example
width: 768
height: 1024Example: Example
width: 1920
height: 1080Example: Example
width: 1366
height: 768待機
browser.wait
一定時間または要素が表示されるまで待機
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
duration_ms | number | No | 1000 | Duration of the operation in milliseconds |
selector | string | No | - | CSS selector, XPath, or text selector to find the element |
state | select (visible, hidden, attached, detached) | No | visible | 待機する状態(表示、非表示、付加、分離) |
timeout_ms | number | No | 30000 | Maximum time to wait in milliseconds |
Output:
| Field | Type | Description |
|---|---|---|
status | string | 操作ステータス |
selector | string | 待機セレクター |
duration_ms | number | 待機時間(ミリ秒) |
Example: Example
duration_ms: 2000Example: Example
selector: #loading-complete
timeout_ms: 5000