Browser Automation
Full web automation: navigation, interaction, data extraction, screenshots, and performance monitoring.
38 modules
| Module | Description |
|---|---|
| Klik Elemen | Klik elemen di halaman |
| Tutup Browser | Tutup instance browser dan lepaskan sumber daya |
| Tangkap Konsol | Tangkap log konsol browser (error, warning, info) |
| Kelola Cookie | Dapatkan, atur, atau hapus cookie browser |
| Tangani Dialog | Tangani dialog alert, confirm, dan prompt |
| Unduh File | Unduh file dari browser |
| Seret dan Lepas | Seret dan lepas elemen |
| Simulasi Perangkat | Mensimulasikan perangkat atau mengatur viewport kustom |
| Pastikan Browser | Pastikan sesi browser ada (gunakan kembali atau luncurkan) |
| Jalankan JavaScript | Jalankan kode JavaScript di konteks halaman |
| Ekstrak Data | Ekstrak data terstruktur dari halaman |
| Temukan Elemen | Temukan elemen di halaman dan kembalikan daftar ID elemen |
| Isi Formulir | Pengisian formulir pintar dengan deteksi bidang otomatis |
| Ganti Frame | Beralih ke konteks iframe atau frame |
| Mock Geolokasi | Mock geolokasi browser |
| Pergi ke URL | Navigasi ke URL tertentu |
| Hover Elemen | Arahkan mouse ke atas elemen |
| Luncurkan Browser | Luncurkan instance browser baru dengan Playwright |
| Navigasi Riwayat | Menavigasi riwayat browser (mundur, maju, muat ulang) |
| Monitor Jaringan | Pantau dan cegat permintaan jaringan |
| Daftar Halaman | Daftar semua halaman/tab browser yang terbuka |
| Paginasi & Ekstrak | Auto-paginasi melalui halaman dan ekstrak data |
| Hasilkan PDF | Hasilkan PDF dari halaman saat ini |
| Metrik Kinerja | Kumpulkan metrik kinerja browser |
| Tekan Tombol | Tekan tombol keyboard |
| Rekam Aksi | Rekam aksi pengguna sebagai workflow |
| Lepaskan Browser | Lepaskan sesi browser (tutup hanya jika dimiliki) |
| Ambil Tangkapan Layar | Ambil tangkapan layar halaman saat ini |
| Gulir Halaman | Gulir halaman ke elemen, posisi, atau arah |
| Pilih Opsi | Pilih opsi dari elemen dropdown |
| Snapshot DOM | Tangkap snapshot DOM dari halaman saat ini |
| Penyimpanan Browser | Akses localStorage dan sessionStorage |
| Kelola Tab | Buat, ganti, dan tutup tab browser |
| Jejak Browser | Mulai, hentikan, atau simpan jejak kinerja browser |
| Ketik Teks | Ketik teks ke dalam field input |
| Unggah File | Unggah file ke elemen input file |
| Atur Viewport | Dapatkan atau atur ukuran viewport browser |
| Tunggu | Tunggu durasi atau sampai elemen muncul |
Modules
Klik Elemen
browser.click
Klik elemen di halaman
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 | Status operasi (success/error) |
selector | string | Status operasi (success/error) |
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-buttonTutup Browser
browser.close
Tutup instance browser dan lepaskan sumber daya
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
_no_params | boolean | No | True | This module requires no parameters |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Tutup instance browser |
message | string | Tutup instance browser |
Example: Example
Tangkap Konsol
browser.console
Tangkap log konsol browser (error, warning, info)
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 | Status operasi (success/error) |
messages | array | Status operasi (success/error) |
count | number | Status operasi (success/error) |
Example: Example
timeout: 3000Example: Example
level: error
timeout: 5000Kelola Cookie
browser.cookies
Dapatkan, atur, atau hapus cookie browser
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 | Status operasi (success/error) |
cookies | array | Status operasi (success/error) |
count | number | Status operasi (success/error) |
Example: Example
action: getExample: Example
action: get
name: session_idExample: Example
action: set
name: user_pref
value: dark_mode
domain: example.comExample: Example
action: clearTangani Dialog
browser.dialog
Tangani dialog alert, confirm, dan 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 | Status operasi (success/error) |
message | string | Status operasi (success/error) |
type | string | Status operasi (success/error) |
default_value | string | Pesan hasil yang menjelaskan outcome |
Example: Example
action: acceptExample: Example
action: dismissExample: Example
action: accept
prompt_text: Hello WorldExample: Example
action: listen
timeout: 5000Unduh File
browser.download
Unduh file dari browser
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 | Status operasi (success/error) |
path | string | Status operasi (success/error) |
filename | string | Status operasi (success/error) |
size | number | Path file atau sumber daya |
Example: Example
selector: #download-btn
save_path: /downloads/report.pdfExample: Example
selector: a.download
save_path: /downloads/large-file.zip
timeout_ms: 120000Seret dan Lepas
browser.drag
Seret dan lepas elemen
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 | Posisi dalam elemen target {x, y} sebagai persentase |
source | string | Posisi dalam elemen target {x, y} sebagai persentase |
target | string | Status operasi (success/error) |
Example: Example
source: #item1
target: #dropzoneExample: Example
source: .draggable
target: .container
target_position: {"x": 0.5, "y": 0.5}Simulasi Perangkat
browser.emulate
Mensimulasikan perangkat atau mengatur viewport kustom
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 | - | Nama perangkat yang akan disimulasikan (misalnya iPhone 13) |
width | number | No | - | Lebar viewport dalam piksel |
height | number | No | - | Tinggi viewport dalam piksel |
user_agent | string | No | - | String user agent kustom |
is_mobile | boolean | No | - | Apakah akan mensimulasikan perangkat mobile |
has_touch | boolean | No | - | Apakah perangkat mendukung sentuhan |
device_scale_factor | number | No | - | Rasio piksel perangkat |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Status operasi (sukses/gagal) |
device | string | Nama perangkat yang disimulasikan |
viewport | object | Dimensi viewport saat ini |
is_mobile | boolean | Apakah simulasi perangkat mobile aktif |
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.0Pastikan Browser
browser.ensure
Pastikan sesi browser ada (gunakan kembali atau luncurkan)
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 | Apakah browser diluncurkan atau digunakan kembali |
message | string | Apakah browser diluncurkan atau digunakan kembali |
is_owner | boolean | Apakah browser diluncurkan atau digunakan kembali |
Example: Example
headless: falseExample: Example
headless: trueJalankan JavaScript
browser.evaluate
Jalankan kode JavaScript di konteks halaman
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 | Status operasi (success/error) |
result | any | Status operasi (success/error) |
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"Ekstrak Data
browser.extract
Ekstrak data terstruktur dari halaman
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 | Status operasi (success/error) |
data | array | Status operasi (success/error) |
count | number | Status operasi (success/error) |
Example: Example
selector: .g
limit: 10
fields: {"title": {"selector": "h3", "type": "text"}, "url": {"selector": "a", "type": "attribute", "attribute": "href"}}Temukan Elemen
browser.find
Temukan elemen di halaman dan kembalikan daftar ID elemen
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 | Status operasi (success/error) |
count | number | Status operasi (success/error) |
element_ids | array | Status operasi (success/error) |
Example: Find search results
selector: div.tF2Cxc
limit: 10Isi Formulir
browser.form
Pengisian formulir pintar dengan deteksi bidang otomatis
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 | Penundaan antara pengisian setiap bidang (untuk perilaku lebih manusiawi) |
failed_fields | array | Daftar bidang yang diisi |
submitted | boolean | Daftar bidang yang diisi |
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"}Ganti Frame
browser.frame
Beralih ke konteks iframe atau frame
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 | Aksi frame (enter untuk beralih ke frame, list untuk daftar semua frame) |
frame_url | string | Aksi frame (enter untuk beralih ke frame, list untuk daftar semua frame) |
frame_name | string | Status operasi (success/error) |
frames | array | URL Frame |
Example: Example
selector: iframe#content-frameExample: Example
name: main-contentExample: Example
action: exitExample: Example
action: listMock Geolokasi
browser.geolocation
Mock geolokasi browser
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 | Akurasi posisi dalam meter |
location | object | Akurasi posisi dalam meter |
Example: Example
latitude: 37.7749
longitude: -122.4194Example: Example
latitude: 51.5074
longitude: -0.1278
accuracy: 10Example: Example
latitude: 35.6762
longitude: 139.6503Pergi ke URL
browser.goto
Navigasi ke URL tertentu
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 | Status operasi (success/error) |
url | string | Navigasi ke URL tertentu |
Example: Example
url: https://www.google.com
wait_until: domcontentloadedHover Elemen
browser.hover
Arahkan mouse ke atas elemen
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 | Status operasi (success/error) |
selector | string | Status operasi (success/error) |
Example: Example
selector: .menu-itemExample: Example
selector: #dropdown-trigger
timeout_ms: 5000Luncurkan Browser
browser.launch
Luncurkan instance browser baru dengan 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 | Mesin browser yang digunakan (chromium, firefox, webkit) |
proxy | string | No | - | URL server proxy |
user_agent | string | No | - | String user agent kustom |
locale | string | No | en-US | Browser locale (e.g. en-US, zh-TW, ja-JP) |
slow_mo | number | No | 0 | Memperlambat operasi dengan milidetik yang ditentukan |
record_video_dir | string | No | - | Directory to save recorded videos (enables Playwright video recording) |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Status operasi (success/error) |
message | string | Luncurkan instance browser baru |
browser_type | string | Jenis browser yang diluncurkan |
headless | boolean | Apakah browser berjalan tanpa antarmuka |
viewport | object | Dimensi viewport saat ini |
Example: Example
headless: trueExample: Example
headless: falseNavigasi Riwayat
browser.navigation
Menavigasi riwayat browser (mundur, maju, muat ulang)
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 | Status operasi (sukses/gagal) |
action | string | Aksi navigasi yang dilakukan |
url | string | URL saat ini setelah navigasi |
Example: Example
action: backExample: Example
action: forwardExample: Example
action: reload
wait_until: networkidleMonitor Jaringan
browser.network
Pantau dan cegat permintaan jaringan
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 | Respons untuk dikembalikan untuk permintaan yang dicegat |
requests | array | Respons untuk dikembalikan untuk permintaan yang dicegat |
blocked_count | number | Status operasi (success/error) |
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\": []}"}Daftar Halaman
browser.pages
Daftar semua halaman/tab browser yang terbuka
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
include_details | boolean | No | True | Sertakan informasi detail untuk setiap halaman |
include_content_info | boolean | No | False | Sertakan informasi tipe konten untuk setiap halaman |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Status operasi (berhasil/gagal) |
pages | array | Daftar halaman yang terbuka |
count | number | Jumlah halaman yang terbuka |
current_index | number | Indeks halaman aktif saat ini |
Example: Example
include_details: trueExample: Example
include_details: falseExample: Example
include_details: true
include_content_info: truePaginasi & Ekstrak
browser.pagination
Auto-paginasi melalui halaman dan ekstrak data
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 | Pemilih yang muncul saat tidak ada halaman lagi (menghentikan paginasi) |
total_items | integer | Semua item yang diekstrak dari semua halaman |
pages_processed | integer | Semua item yang diekstrak dari semua halaman |
stopped_reason | string | Jumlah halaman yang diproses |
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: 10Hasilkan PDF
browser.pdf
Hasilkan PDF dari halaman saat ini
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 | Skala rendering halaman web (0.1-2) |
path | string | Status operasi (success/error) |
size | number | Status operasi (success/error) |
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"}Metrik Kinerja
browser.performance
Kumpulkan metrik kinerja browser
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
metrics | array | No | ['all'] | Metrik kinerja yang akan dikumpulkan |
timeout_ms | number | No | 3000 | Batas waktu dalam milidetik |
setup_observers | boolean | No | True | Siapkan pengamat kinerja sebelum mengumpulkan |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Status operasi (berhasil/gagal) |
metrics | object | Metrik kinerja yang dikumpulkan |
Example: Example
metrics: ["all"]
timeout_ms: 5000Example: Example
metrics: ["lcp", "fcp", "cls"]Example: Example
metrics: ["ttfb", "domContentLoaded", "load"]
timeout_ms: 0Tekan Tombol
browser.press
Tekan tombol keyboard
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
key | string | Yes | - | The key to press (e.g., Enter, Escape, Tab) |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Status operasi (success/error) |
key | string | Tekan tombol keyboard |
Example: Example
key: EnterExample: Example
key: EscapeRekam Aksi
browser.record
Rekam aksi pengguna sebagai workflow
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 | Format untuk workflow yang direkam (yaml atau json) |
recording | array | Format untuk workflow yang direkam (yaml atau json) |
workflow | string | Status operasi (success/error) |
Example: Example
action: startExample: Example
action: stop
output_format: yamlExample: Example
action: getLepaskan Browser
browser.release
Lepaskan sesi browser (tutup hanya jika dimiliki)
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
force | boolean | No | False | Tutup browser meskipun tidak dimiliki oleh template ini |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Tutup browser meskipun tidak dimiliki oleh template ini |
message | string | Tindakan apa yang diambil |
was_owner | boolean | Tindakan apa yang diambil |
Example: Example
Example: Example
force: trueAmbil Tangkapan Layar
browser.screenshot
Ambil tangkapan layar halaman saat ini
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 | Status operasi (success/error) |
filepath | string | Ambil tangkapan layar halaman saat ini |
Example: Example
path: output/page.pngGulir Halaman
browser.scroll
Gulir halaman ke elemen, posisi, atau arah
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 | Status operasi (success/error) |
scrolled_to | object | Status operasi (success/error) |
Example: Example
selector: #footerExample: Example
direction: down
amount: 500Example: Example
direction: up
amount: 10000
behavior: smoothPilih Opsi
browser.select
Pilih opsi dari elemen dropdown
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 | Status operasi (success/error) |
selected | array | Status operasi (success/error) |
selector | string | Status operasi (success/error) |
Example: Example
selector: select#country
value: usExample: Example
selector: select#country
label: United StatesExample: Example
selector: select#country
index: 2Snapshot DOM
browser.snapshot
Tangkap snapshot DOM dari halaman saat ini
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
format | select (html, mhtml, text) | No | html | Format keluaran (html atau teks) |
selector | string | No | - | Pemilih CSS untuk menangkap elemen tertentu |
path | string | No | - | Jalur untuk menyimpan snapshot |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Status operasi (berhasil/gagal) |
format | string | Format snapshot |
content | string | Konten snapshot |
path | string | Jalur tempat snapshot disimpan |
size_bytes | number | Ukuran snapshot dalam byte |
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.htmlPenyimpanan Browser
browser.storage
Akses localStorage dan 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 | Status operasi (success/error) |
value | any | Status operasi (success/error) |
keys | array | Status operasi (success/error) |
length | number | Nilai yang dikembalikan |
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: localKelola Tab
browser.tab
Buat, ganti, dan tutup tab browser
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 | Indeks tab untuk diganti atau ditutup (berbasis 0) |
tab_count | number | Indeks tab untuk diganti atau ditutup (berbasis 0) |
current_index | number | Status operasi (success/error) |
tabs | array | Jumlah tab |
Example: Example
action: new
url: https://example.comExample: Example
action: switch
index: 0Example: Example
action: closeExample: Example
action: listJejak Browser
browser.trace
Mulai, hentikan, atau simpan jejak kinerja browser
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | - | Tindakan jejak (mulai, hentikan, simpan) |
categories | array | No | ['devtools.timeline'] | Kategori jejak yang akan ditangkap |
screenshots | boolean | No | True | Sertakan tangkapan layar dalam jejak |
path | string | No | - | Jalur untuk menyimpan file jejak |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Status operasi (berhasil/gagal) |
tracing | boolean | Apakah penelusuran sedang aktif |
path | string | Jalur tempat jejak disimpan |
size_bytes | number | Ukuran file jejak dalam byte |
Example: Example
action: start
screenshots: trueExample: Example
action: start
categories: ["devtools.timeline", "v8.execute"]
screenshots: falseExample: Example
action: stop
path: /tmp/performance-trace.jsonKetik Teks
browser.type
Ketik teks ke dalam field input
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 | Status operasi (success/error) |
selector | string | Ketik teks ke dalam field input |
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.comUnggah File
browser.upload
Unggah file ke elemen input file
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 | Status operasi (success/error) |
filename | string | Status operasi (success/error) |
size | number | Status operasi (success/error) |
selector | string | Nama file |
Example: Example
selector: input[type="file"]
file_path: /path/to/image.pngExample: Example
selector: #file-upload
file_path: /path/to/document.pdfAtur Viewport
browser.viewport
Dapatkan atau atur ukuran viewport browser
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
width | number | Yes | 1280 | Lebar viewport dalam piksel |
height | number | Yes | 720 | Tinggi viewport dalam piksel |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Status operasi (berhasil/gagal) |
viewport | object | Dimensi viewport saat ini |
previous_viewport | object | Dimensi viewport sebelumnya |
Example: Example
width: 375
height: 667Example: Example
width: 768
height: 1024Example: Example
width: 1920
height: 1080Example: Example
width: 1366
height: 768Tunggu
browser.wait
Tunggu durasi atau sampai elemen muncul
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 | Status untuk ditunggu (terlihat, tersembunyi, terlampir, terlepas) |
timeout_ms | number | No | 30000 | Maximum time to wait in milliseconds |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Status operasi (success/error) |
selector | string | Status operasi (success/error) |
duration_ms | number | Tunggu durasi atau elemen muncul |
Example: Example
duration_ms: 2000Example: Example
selector: #loading-complete
timeout_ms: 5000