Skip to content

Browser Automation

Full web automation: navigation, interaction, data extraction, screenshots, and performance monitoring.

38 modules

ModuleDescription
คลิกองค์ประกอบคลิกองค์ประกอบบนหน้า
ปิดเบราว์เซอร์ปิดอินสแตนซ์เบราว์เซอร์และปล่อยทรัพยากร
จับคอนโซลจับบันทึกคอนโซลเบราว์เซอร์ (ข้อผิดพลาด คำเตือน ข้อมูล)
จัดการคุกกี้รับ ตั้งค่า หรือล้างคุกกี้เบราว์เซอร์
จัดการ Dialogจัดการกล่องโต้ตอบ alert, confirm และ prompt
ดาวน์โหลดไฟล์ดาวน์โหลดไฟล์จากเบราว์เซอร์
ลากและวางลากและวางองค์ประกอบ
จำลองอุปกรณ์จำลองอุปกรณ์หรือกำหนดขนาดหน้าต่างเอง
ตรวจสอบเบราว์เซอร์ตรวจสอบให้แน่ใจว่ามีเซสชันเบราว์เซอร์อยู่ (ใช้ซ้ำหรือเปิดใหม่)
รัน JavaScriptรันโค้ด JavaScript ในบริบทหน้า
ดึงข้อมูลดึงข้อมูลที่มีโครงสร้างจากหน้า
ค้นหาองค์ประกอบค้นหาองค์ประกอบในหน้าและส่งคืนรายการ ID องค์ประกอบ
กรอกฟอร์มกรอกฟอร์มอัตโนมัติด้วยการตรวจจับช่องกรอก
สลับ Frameสลับไปยังบริบท iframe หรือ frame
จำลอง Geolocationจำลองตำแหน่งทางภูมิศาสตร์ของเบราว์เซอร์
ไปยัง URLนำทางไปยัง URL ที่ระบุ
วางเมาส์เหนือองค์ประกอบวางเมาส์เหนือองค์ประกอบ
เปิดเบราว์เซอร์เปิดอินสแตนซ์เบราว์เซอร์ใหม่ด้วย Playwright
นำทางประวัตินำทางประวัติเบราว์เซอร์ (ย้อนกลับ, ไปข้างหน้า, โหลดซ้ำ)
ตรวจสอบเครือข่ายติดตามและดักจับคำขอเครือข่าย
รายการหน้าแสดงรายการหน้า/แท็บเบราว์เซอร์ที่เปิดอยู่ทั้งหมด
แบ่งหน้า & ดึงข้อมูลแบ่งหน้าอัตโนมัติและดึงข้อมูล
สร้าง PDFสร้าง PDF จากหน้าปัจจุบัน
ข้อมูลประสิทธิภาพรวบรวมข้อมูลประสิทธิภาพของเบราว์เซอร์
กดปุ่มกดปุ่มแป้นพิมพ์
บันทึกการกระทำบันทึกการกระทำของผู้ใช้เป็น workflow
ปล่อยเบราว์เซอร์ปล่อยเซสชันเบราว์เซอร์ (ปิดเฉพาะถ้าเป็นเจ้าของ)
ถ่ายภาพหน้าจอถ่ายภาพหน้าจอของหน้าปัจจุบัน
เลื่อนหน้าเลื่อนหน้าไปยังองค์ประกอบ ตำแหน่ง หรือทิศทาง
เลือกตัวเลือกเลือกตัวเลือกจากองค์ประกอบ dropdown
ภาพ DOMจับภาพ DOM ของหน้าปัจจุบัน
พื้นที่เก็บข้อมูลของเบราว์เซอร์เข้าถึง localStorage และ sessionStorage
จัดการแท็บสร้าง สลับ และปิดแท็บเบราว์เซอร์
การติดตามเบราว์เซอร์เริ่ม หยุด หรือบันทึกการติดตามประสิทธิภาพของเบราว์เซอร์
พิมพ์ข้อความพิมพ์ข้อความลงในฟิลด์อินพุต
อัปโหลดไฟล์อัปโหลดไฟล์ไปยังองค์ประกอบ file input
ตั้งค่าหน้าต่างรับหรือกำหนดขนาดหน้าต่างเบราว์เซอร์
รอรอระยะเวลาหรือจนกว่าองค์ประกอบจะปรากฏ

Modules

คลิกองค์ประกอบ

browser.click

คลิกองค์ประกอบบนหน้า

Parameters:

NameTypeRequiredDefaultDescription
click_methodselect (text, button, id, selector)NotextChoose the easiest way to identify the element you want to click
targetstringNo-e.g. "Submit", "Next Page", "Login"
selectorstringNo-CSS selector, XPath, or text selector
buttonselect (left, right, middle)NoleftWhich mouse button to use for clicking
click_countnumberNo1Number of clicks (2 for double-click, 3 for triple-click)
forcebooleanNoFalseForce click even if element is not actionable (covered, invisible)
modifiersarrayNo-Modifier keys to hold during click
timeoutnumberNo30000Maximum time to wait in milliseconds

Output:

FieldTypeDescription
browserobjectBrowser session (pass-through for chaining)
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
selectorstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
methodstringClick method used

Example: Example

yaml
click_method: text
target: Submit

Example: Example

yaml
click_method: id
target: login-button

Example: Example

yaml
click_method: selector
selector: #submit-button

ปิดเบราว์เซอร์

browser.close

ปิดอินสแตนซ์เบราว์เซอร์และปล่อยทรัพยากร

Parameters:

NameTypeRequiredDefaultDescription
_no_paramsbooleanNoTrueThis module requires no parameters

Output:

FieldTypeDescription
statusstringปิดอินสแตนซ์เบราว์เซอร์
messagestringปิดอินสแตนซ์เบราว์เซอร์

Example: Example

yaml

จับคอนโซล

browser.console

จับบันทึกคอนโซลเบราว์เซอร์ (ข้อผิดพลาด คำเตือน ข้อมูล)

Parameters:

NameTypeRequiredDefaultDescription
levelselect (all, error, warning, info, log)NoallFilter console messages by level
timeoutnumberNo5000Maximum time to wait in milliseconds
clear_existingbooleanNoFalseClear existing messages before capturing

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
messagesarrayสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
countnumberสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)

Example: Example

yaml
timeout: 3000

Example: Example

yaml
level: error
timeout: 5000

จัดการคุกกี้

browser.cookies

รับ ตั้งค่า หรือล้างคุกกี้เบราว์เซอร์

Parameters:

NameTypeRequiredDefaultDescription
actionselect (get, set, clear, delete)Yes-Action to perform on the storage
namestringNo-Name of the cookie
valuestringNo-Value of the cookie
domainstringNo-Cookie domain
pathstringNo/Cookie path
securebooleanNoFalseWhether cookie is secure (HTTPS only)
httpOnlybooleanNoFalseWhether cookie is HTTP only
expiresnumberNo-Cookie expiration time (Unix timestamp)

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
cookiesarrayสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
countnumberสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)

Example: Example

yaml
action: get

Example: Example

yaml
action: get
name: session_id

Example: Example

yaml
action: set
name: user_pref
value: dark_mode
domain: example.com

Example: Example

yaml
action: clear

จัดการ Dialog

browser.dialog

จัดการกล่องโต้ตอบ alert, confirm และ prompt

Parameters:

NameTypeRequiredDefaultDescription
actionselect (accept, dismiss, listen)Yes-How to respond to the dialog
prompt_textstringNo-Text to enter in prompt dialog (for accept action)
timeoutnumberNo30000Maximum time to wait in milliseconds

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
messagestringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
typestringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
default_valuestringข้อความผลลัพธ์อธิบายผลลัพธ์

Example: Example

yaml
action: accept

Example: Example

yaml
action: dismiss

Example: Example

yaml
action: accept
prompt_text: Hello World

Example: Example

yaml
action: listen
timeout: 5000

ดาวน์โหลดไฟล์

browser.download

ดาวน์โหลดไฟล์จากเบราว์เซอร์

Parameters:

NameTypeRequiredDefaultDescription
selectorstringNo-CSS selector, XPath, or text selector to find the element
save_pathstringYes-Path where to save the downloaded file
timeout_msnumberNo60000Maximum time to wait in milliseconds

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
pathstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
filenamestringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
sizenumberเส้นทางไฟล์หรือทรัพยากร

Example: Example

yaml
selector: #download-btn
save_path: /downloads/report.pdf

Example: Example

yaml
selector: a.download
save_path: /downloads/large-file.zip
timeout_ms: 120000

ลากและวาง

browser.drag

ลากและวางองค์ประกอบ

Parameters:

NameTypeRequiredDefaultDescription
sourcestringYes-CSS selector, XPath, or text selector to find the element
targetstringYes-CSS selector, XPath, or text selector to find the element
source_positionobjectNo-Position within source element {x, y} as percentages
target_positionobjectNo-Position within target element {x, y} as percentages
timeoutnumberNo30000Maximum time to wait in milliseconds

Output:

FieldTypeDescription
statusstringตำแหน่งภายในองค์ประกอบเป้าหมาย {x, y} เป็นเปอร์เซ็นต์
sourcestringตำแหน่งภายในองค์ประกอบเป้าหมาย {x, y} เป็นเปอร์เซ็นต์
targetstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)

Example: Example

yaml
source: #item1
target: #dropzone

Example: Example

yaml
source: .draggable
target: .container
target_position: {"x": 0.5, "y": 0.5}

จำลองอุปกรณ์

browser.emulate

จำลองอุปกรณ์หรือกำหนดขนาดหน้าต่างเอง

Parameters:

NameTypeRequiredDefaultDescription
deviceselect (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)
widthnumberNo-ความกว้างของหน้าต่างในพิกเซล
heightnumberNo-ความสูงของหน้าต่างในพิกเซล
user_agentstringNo-สตริง user agent ที่กำหนดเอง
is_mobilebooleanNo-จำลองอุปกรณ์มือถือหรือไม่
has_touchbooleanNo-อุปกรณ์มีการรองรับการสัมผัสหรือไม่
device_scale_factornumberNo-อัตราส่วนพิกเซลของอุปกรณ์

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ผิดพลาด)
devicestringชื่ออุปกรณ์ที่ถูกจำลอง
viewportobjectขนาดหน้าต่างปัจจุบัน
is_mobilebooleanการจำลองมือถือเปิดใช้งานหรือไม่

Example: Example

yaml
device: iphone_14

Example: Example

yaml
device: ipad_pro

Example: Example

yaml
device: custom
width: 400
height: 800
is_mobile: true
has_touch: true
device_scale_factor: 2

Example: Example

yaml
device: desktop_chrome
user_agent: CustomBot/1.0

ตรวจสอบเบราว์เซอร์

browser.ensure

ตรวจสอบให้แน่ใจว่ามีเซสชันเบราว์เซอร์อยู่ (ใช้ซ้ำหรือเปิดใหม่)

Parameters:

NameTypeRequiredDefaultDescription
headlessbooleanNoFalseRun browser without visible window
widthnumberNo1280Browser viewport width in pixels
heightnumberNo720Browser viewport height in pixels

Output:

FieldTypeDescription
statusstringเบราว์เซอร์ถูกเปิดใหม่หรือใช้ซ้ำ
messagestringเบราว์เซอร์ถูกเปิดใหม่หรือใช้ซ้ำ
is_ownerbooleanเบราว์เซอร์ถูกเปิดใหม่หรือใช้ซ้ำ

Example: Example

yaml
headless: false

Example: Example

yaml
headless: true

รัน JavaScript

browser.evaluate

รันโค้ด JavaScript ในบริบทหน้า

Parameters:

NameTypeRequiredDefaultDescription
scriptstringYes-JavaScript code to execute (can use return statement)
argsarrayNo-Arguments to pass to the script function

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
resultanyสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)

Example: Example

yaml
script: return document.title

Example: Example

yaml
script: return document.querySelectorAll("a").length

Example: Example

yaml
script: (selector) => document.querySelector(selector)?.textContent
args: ["#header"]

Example: Example

yaml
script: document.body.style.backgroundColor = "red"; return "done"

ดึงข้อมูล

browser.extract

ดึงข้อมูลที่มีโครงสร้างจากหน้า

Parameters:

NameTypeRequiredDefaultDescription
selectorstringYes-CSS selector, XPath, or text selector to find the element
limitnumberNo-Maximum number of items to extract
fieldsobjectNo-Define fields to extract from each item

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
dataarrayสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
countnumberสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)

Example: Example

yaml
selector: .g
limit: 10
fields: {"title": {"selector": "h3", "type": "text"}, "url": {"selector": "a", "type": "attribute", "attribute": "href"}}

ค้นหาองค์ประกอบ

browser.find

ค้นหาองค์ประกอบในหน้าและส่งคืนรายการ ID องค์ประกอบ

Parameters:

NameTypeRequiredDefaultDescription
selectorstringYes-CSS selector, XPath, or text selector to find the element
limitnumberNo-Maximum number of items to extract

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
countnumberสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
element_idsarrayสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)

Example: Find search results

yaml
selector: div.tF2Cxc
limit: 10

กรอกฟอร์ม

browser.form

กรอกฟอร์มอัตโนมัติด้วยการตรวจจับช่องกรอก

Parameters:

NameTypeRequiredDefaultDescription
form_selectorstringNo-CSS selector for the form element (optional)
dataobjectYes-Key-value pairs to fill (key = field name/id, value = content)
field_mappingobjectNo-Custom selector mapping
clear_before_fillbooleanNoTrueClear existing field values before filling
submitbooleanNoFalseSubmit form after filling
submit_selectorstringNo-CSS selector for submit button
delay_between_fields_msnumberNo100Delay between filling each field (for more human-like behavior)

Output:

FieldTypeDescription
filled_fieldsarrayหน่วงเวลาระหว่างการกรอกแต่ละช่อง (เพื่อให้ดูเป็นธรรมชาติ)
failed_fieldsarrayรายการช่องที่ถูกกรอกแล้ว
submittedbooleanรายการช่องที่ถูกกรอกแล้ว

Example: Example

yaml
data: {"email": "user@example.com", "password": "secret123"}
submit: true

Example: Example

yaml
data: {"username": "john_doe", "bio": "Hello world"}
field_mapping: {"username": "#user-name-input", "bio": "textarea.bio-field"}

สลับ Frame

browser.frame

สลับไปยังบริบท iframe หรือ frame

Parameters:

NameTypeRequiredDefaultDescription
selectorstringNo-CSS selector, XPath, or text selector to find the element
namestringNo-Name attribute of the frame (alternative to selector)
urlstringNo-URL pattern to match frame (alternative to selector)
actionstringNoenterFrame action to perform
timeoutnumberNo30000Maximum time to wait in milliseconds

Output:

FieldTypeDescription
statusstringการดำเนินการ Frame (enter เพื่อสลับไป frame, list เพื่อแสดงรายการ frames ทั้งหมด)
frame_urlstringการดำเนินการ Frame (enter เพื่อสลับไป frame, list เพื่อแสดงรายการ frames ทั้งหมด)
frame_namestringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
framesarrayURL ของ Frame

Example: Example

yaml
selector: iframe#content-frame

Example: Example

yaml
name: main-content

Example: Example

yaml
action: exit

Example: Example

yaml
action: list

จำลอง Geolocation

browser.geolocation

จำลองตำแหน่งทางภูมิศาสตร์ของเบราว์เซอร์

Parameters:

NameTypeRequiredDefaultDescription
latitudenumberYes-Latitude coordinate (-90 to 90)
longitudenumberYes-Longitude coordinate (-180 to 180)
accuracynumberNo100Position accuracy in meters

Output:

FieldTypeDescription
statusstringความแม่นยำตำแหน่งเป็นเมตร
locationobjectความแม่นยำตำแหน่งเป็นเมตร

Example: Example

yaml
latitude: 37.7749
longitude: -122.4194

Example: Example

yaml
latitude: 51.5074
longitude: -0.1278
accuracy: 10

Example: Example

yaml
latitude: 35.6762
longitude: 139.6503

ไปยัง URL

browser.goto

นำทางไปยัง URL ที่ระบุ

Parameters:

NameTypeRequiredDefaultDescription
urlstringYes-URL to navigate to
wait_untilselect (load, domcontentloaded, networkidle)NodomcontentloadedWhen to consider navigation complete
timeout_msnumberNo30000Maximum time to wait in milliseconds

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
urlstringนำทางไปยัง URL ที่ระบุ

Example: Example

yaml
url: https://www.google.com
wait_until: domcontentloaded

วางเมาส์เหนือองค์ประกอบ

browser.hover

วางเมาส์เหนือองค์ประกอบ

Parameters:

NameTypeRequiredDefaultDescription
selectorstringYes-CSS selector, XPath, or text selector to find the element
timeout_msnumberNo30000Maximum time to wait in milliseconds
positionobjectNo-Click position relative to element (0-1 range)

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
selectorstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)

Example: Example

yaml
selector: .menu-item

Example: Example

yaml
selector: #dropdown-trigger
timeout_ms: 5000

เปิดเบราว์เซอร์

browser.launch

เปิดอินสแตนซ์เบราว์เซอร์ใหม่ด้วย Playwright

Parameters:

NameTypeRequiredDefaultDescription
headlessbooleanNoFalseRun browser without visible window
widthnumberNo1280Browser viewport width in pixels
heightnumberNo720Browser viewport height in pixels
browser_typeselect (chromium, firefox, webkit)Nochromiumเอนจินเบราว์เซอร์ที่จะใช้ (chromium, firefox, webkit)
proxystringNo-URL ของเซิร์ฟเวอร์พร็อกซี
user_agentstringNo-สตริง user agent ที่กำหนดเอง
localestringNoen-USBrowser locale (e.g. en-US, zh-TW, ja-JP)
slow_monumberNo0ชะลอการทำงานตามมิลลิวินาทีที่ระบุ
record_video_dirstringNo-Directory to save recorded videos (enables Playwright video recording)

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
messagestringเปิดอินสแตนซ์เบราว์เซอร์ใหม่
browser_typestringประเภทของเบราว์เซอร์ที่เปิดใช้งาน
headlessbooleanเบราว์เซอร์ทำงานแบบไม่แสดงผลหรือไม่
viewportobjectขนาดหน้าต่างปัจจุบัน

Example: Example

yaml
headless: true

Example: Example

yaml
headless: false

นำทางประวัติ

browser.navigation

นำทางประวัติเบราว์เซอร์ (ย้อนกลับ, ไปข้างหน้า, โหลดซ้ำ)

Parameters:

NameTypeRequiredDefaultDescription
actionselect (back, forward, reload)YesreloadWhich navigation action to perform
wait_untilselect (load, domcontentloaded, networkidle)NodomcontentloadedWhen to consider navigation complete
timeout_msnumberNo30000Maximum time to wait in milliseconds

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ผิดพลาด)
actionstringการกระทำการนำทางที่ดำเนินการ
urlstringURL ปัจจุบันหลังการนำทาง

Example: Example

yaml
action: back

Example: Example

yaml
action: forward

Example: Example

yaml
action: reload
wait_until: networkidle

ตรวจสอบเครือข่าย

browser.network

ติดตามและดักจับคำขอเครือข่าย

Parameters:

NameTypeRequiredDefaultDescription
actionselect (monitor, block, intercept)Yes-Network action to perform
url_patternstringNo-Regex pattern to match request URLs
resource_typestringNo-Filter by resource type (document, script, image, etc)
timeoutnumberNo30000Maximum time to wait in milliseconds
mock_responseobjectNo-Response to return for intercepted requests

Output:

FieldTypeDescription
statusstringการตอบกลับที่จะส่งคืนสำหรับคำขอที่ดักจับ
requestsarrayการตอบกลับที่จะส่งคืนสำหรับคำขอที่ดักจับ
blocked_countnumberสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)

Example: Example

yaml
action: monitor
url_pattern: .*api.*
timeout: 10000

Example: Example

yaml
action: block
resource_type: image

Example: Example

yaml
action: intercept
url_pattern: .*users.*
mock_response: {"status": 200, "body": "{\"users\": []}"}

รายการหน้า

browser.pages

แสดงรายการหน้า/แท็บเบราว์เซอร์ที่เปิดอยู่ทั้งหมด

Parameters:

NameTypeRequiredDefaultDescription
include_detailsbooleanNoTrueรวมข้อมูลรายละเอียดสำหรับแต่ละหน้า
include_content_infobooleanNoFalseรวมข้อมูลประเภทเนื้อหาสำหรับแต่ละหน้า

Output:

FieldTypeDescription
statusstringสถานะการทำงาน (สำเร็จ/ผิดพลาด)
pagesarrayรายการหน้าที่เปิดอยู่
countnumberจำนวนหน้าที่เปิดอยู่
current_indexnumberดัชนีของหน้าที่ใช้งานอยู่ในปัจจุบัน

Example: Example

yaml
include_details: true

Example: Example

yaml
include_details: false

Example: Example

yaml
include_details: true
include_content_info: true

แบ่งหน้า & ดึงข้อมูล

browser.pagination

แบ่งหน้าอัตโนมัติและดึงข้อมูล

Parameters:

NameTypeRequiredDefaultDescription
modeselect (next_button, infinite_scroll, page_numbers, load_more)Nonext_buttonHow to navigate between pages
item_selectorstringYes-CSS selector for items to extract on each page
fieldsobjectNo-Field definitions {name: {selector, attribute?}}
next_selectorstringNo-CSS selector for next page button
load_more_selectorstringNo-CSS selector for load more button
max_pagesnumberNo10Maximum number of pages to process (0 = unlimited)
max_itemsnumberNo0Stop after collecting this many items (0 = unlimited)
wait_between_pages_msnumberNo1000Wait time between page navigations
wait_for_selectorstringNo-Wait for this element after page change
scroll_amountnumberNo1000Pixels to scroll for infinite scroll mode
no_more_indicatorstringNo-Selector that appears when no more pages (stops pagination)

Output:

FieldTypeDescription
itemsarrayตัวเลือกที่ปรากฏเมื่อไม่มีหน้าเพิ่มเติม (หยุดการแบ่งหน้า)
total_itemsintegerรายการทั้งหมดที่ดึงจากทุกหน้า
pages_processedintegerรายการทั้งหมดที่ดึงจากทุกหน้า
stopped_reasonstringจำนวนหน้าที่ประมวลผล

Example: Example

yaml
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: 5

Example: Example

yaml
mode: infinite_scroll
item_selector: .feed-item
fields: {"content": {"selector": ".content"}, "author": {"selector": ".author"}}
max_items: 100
no_more_indicator: .end-of-feed

Example: Example

yaml
mode: load_more
item_selector: .list-item
load_more_selector: button.load-more
max_pages: 10

สร้าง PDF

browser.pdf

สร้าง PDF จากหน้าปัจจุบัน

Parameters:

NameTypeRequiredDefaultDescription
pathstringNo-Path where the output file will be saved
page_sizeselect (A4, Letter, Legal, A3, A5)NoA4Page size format
orientationselect (portrait, landscape)NoportraitPage orientation
print_backgroundbooleanNoTrueInclude background graphics
scalenumberNo1Scale of the webpage rendering (0.1-2)
marginnumberNo20Page margin in millimeters
headerstringNo-Header text for each page
footerstringNo-Footer text for each page

Output:

FieldTypeDescription
statusstringขนาดการแสดงผลหน้าเว็บ (0.1-2)
pathstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
sizenumberสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)

Example: Example

yaml
path: /output/page.pdf

Example: Example

yaml
path: /output/landscape.pdf
landscape: true

Example: Example

yaml
path: /output/custom.pdf
margin: {"top": "1cm", "bottom": "1cm", "left": "2cm", "right": "2cm"}

ข้อมูลประสิทธิภาพ

browser.performance

รวบรวมข้อมูลประสิทธิภาพของเบราว์เซอร์

Parameters:

NameTypeRequiredDefaultDescription
metricsarrayNo['all']ข้อมูลประสิทธิภาพที่ต้องการรวบรวม
timeout_msnumberNo3000เวลาหมดในหน่วยมิลลิวินาที
setup_observersbooleanNoTrueตั้งค่าผู้สังเกตก่อนการรวบรวม

Output:

FieldTypeDescription
statusstringสถานะการทำงาน (สำเร็จ/ผิดพลาด)
metricsobjectข้อมูลประสิทธิภาพที่รวบรวมได้

Example: Example

yaml
metrics: ["all"]
timeout_ms: 5000

Example: Example

yaml
metrics: ["lcp", "fcp", "cls"]

Example: Example

yaml
metrics: ["ttfb", "domContentLoaded", "load"]
timeout_ms: 0

กดปุ่ม

browser.press

กดปุ่มแป้นพิมพ์

Parameters:

NameTypeRequiredDefaultDescription
keystringYes-The key to press (e.g., Enter, Escape, Tab)

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
keystringกดปุ่มแป้นพิมพ์

Example: Example

yaml
key: Enter

Example: Example

yaml
key: Escape

บันทึกการกระทำ

browser.record

บันทึกการกระทำของผู้ใช้เป็น workflow

Parameters:

NameTypeRequiredDefaultDescription
actionstringYes-Recording action to perform
output_formatstringNoyamlFormat for recorded workflow
output_pathstringNo-Path where the output file will be saved

Output:

FieldTypeDescription
statusstringรูปแบบสำหรับ workflow ที่บันทึก (yaml หรือ json)
recordingarrayรูปแบบสำหรับ workflow ที่บันทึก (yaml หรือ json)
workflowstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)

Example: Example

yaml
action: start

Example: Example

yaml
action: stop
output_format: yaml

Example: Example

yaml
action: get

ปล่อยเบราว์เซอร์

browser.release

ปล่อยเซสชันเบราว์เซอร์ (ปิดเฉพาะถ้าเป็นเจ้าของ)

Parameters:

NameTypeRequiredDefaultDescription
forcebooleanNoFalseปิดเบราว์เซอร์แม้ไม่ได้เป็นเจ้าของโดยเทมเพลตนี้

Output:

FieldTypeDescription
statusstringปิดเบราว์เซอร์แม้ไม่ได้เป็นเจ้าของโดยเทมเพลตนี้
messagestringดำเนินการอะไร
was_ownerbooleanดำเนินการอะไร

Example: Example

yaml

Example: Example

yaml
force: true

ถ่ายภาพหน้าจอ

browser.screenshot

ถ่ายภาพหน้าจอของหน้าปัจจุบัน

Parameters:

NameTypeRequiredDefaultDescription
pathstringNoscreenshot.pngPath where the output file will be saved
full_pagebooleanNoFalseCapture the entire scrollable page
formatselect (png, jpeg, webp)NopngImage format for the screenshot
qualitynumberNo-Quality for JPEG/WebP format (0-100)

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
filepathstringถ่ายภาพหน้าจอของหน้าปัจจุบัน

Example: Example

yaml
path: output/page.png

เลื่อนหน้า

browser.scroll

เลื่อนหน้าไปยังองค์ประกอบ ตำแหน่ง หรือทิศทาง

Parameters:

NameTypeRequiredDefaultDescription
selectorstringNo-CSS selector, XPath, or text selector to find the element
directionselect (down, up, left, right)NodownDirection to scroll the page
amountnumberNo500Pixels to scroll (ignored if selector is provided)
behaviorselect (smooth, instant)NosmoothHow the scroll animation behaves

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
scrolled_toobjectสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)

Example: Example

yaml
selector: #footer

Example: Example

yaml
direction: down
amount: 500

Example: Example

yaml
direction: up
amount: 10000
behavior: smooth

เลือกตัวเลือก

browser.select

เลือกตัวเลือกจากองค์ประกอบ dropdown

Parameters:

NameTypeRequiredDefaultDescription
selectorstringYes-CSS selector, XPath, or text selector to find the element
valuestringNo-Option value attribute to select
labelstringNo-Option text content to select (alternative to value)
indexnumberNo-Option index to select (0-based)
timeoutnumberNo30000Maximum time to wait in milliseconds

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
selectedarrayสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
selectorstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)

Example: Example

yaml
selector: select#country
value: us

Example: Example

yaml
selector: select#country
label: United States

Example: Example

yaml
selector: select#country
index: 2

ภาพ DOM

browser.snapshot

จับภาพ DOM ของหน้าปัจจุบัน

Parameters:

NameTypeRequiredDefaultDescription
formatselect (html, mhtml, text)Nohtmlรูปแบบผลลัพธ์ (html หรือ text)
selectorstringNo-ตัวเลือก CSS เพื่อจับภาพองค์ประกอบเฉพาะ
pathstringNo-เส้นทางในการบันทึกภาพ

Output:

FieldTypeDescription
statusstringสถานะการทำงาน (สำเร็จ/ผิดพลาด)
formatstringรูปแบบของภาพ
contentstringเนื้อหาภาพ
pathstringเส้นทางที่บันทึกภาพ
size_bytesnumberขนาดของภาพในหน่วยไบต์

Example: Example

yaml
format: html

Example: Example

yaml
format: mhtml
path: /tmp/page.mhtml

Example: Example

yaml
format: text
selector: article.main-content

Example: Example

yaml
format: html
selector: #main
path: /tmp/section.html

พื้นที่เก็บข้อมูลของเบราว์เซอร์

browser.storage

เข้าถึง localStorage และ sessionStorage

Parameters:

NameTypeRequiredDefaultDescription
actionselect (get, set, remove, clear, keys, length)Yes-Action to perform on the storage
typeselect (local, session)NolocalBrowser storage type to access
keystringNo-Storage key
valuestringNo-Value to store

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
valueanyสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
keysarrayสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
lengthnumberค่าที่ส่งคืน

Example: Example

yaml
action: get
type: local
key: user_token

Example: Example

yaml
action: set
type: session
key: temp_data
value: {"id": 123}

Example: Example

yaml
action: clear
type: local

Example: Example

yaml
action: keys
type: local

จัดการแท็บ

browser.tab

สร้าง สลับ และปิดแท็บเบราว์เซอร์

Parameters:

NameTypeRequiredDefaultDescription
actionstringYes-Tab action to perform
urlstringNo-URL to navigate to
indexnumberNo-Tab index to switch to or close (0-based)

Output:

FieldTypeDescription
statusstringดัชนีแท็บที่จะสลับไปหรือปิด (เริ่มจาก 0)
tab_countnumberดัชนีแท็บที่จะสลับไปหรือปิด (เริ่มจาก 0)
current_indexnumberสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
tabsarrayจำนวนแท็บ

Example: Example

yaml
action: new
url: https://example.com

Example: Example

yaml
action: switch
index: 0

Example: Example

yaml
action: close

Example: Example

yaml
action: list

การติดตามเบราว์เซอร์

browser.trace

เริ่ม หยุด หรือบันทึกการติดตามประสิทธิภาพของเบราว์เซอร์

Parameters:

NameTypeRequiredDefaultDescription
actionstringYes-การกระทำการติดตาม (เริ่ม หยุด บันทึก)
categoriesarrayNo['devtools.timeline']หมวดหมู่การติดตามที่ต้องการจับภาพ
screenshotsbooleanNoTrueรวมภาพหน้าจอในการติดตาม
pathstringNo-เส้นทางในการบันทึกไฟล์การติดตาม

Output:

FieldTypeDescription
statusstringสถานะการทำงาน (สำเร็จ/ผิดพลาด)
tracingbooleanการติดตามกำลังทำงานอยู่หรือไม่
pathstringเส้นทางที่บันทึกการติดตาม
size_bytesnumberขนาดของไฟล์การติดตามในหน่วยไบต์

Example: Example

yaml
action: start
screenshots: true

Example: Example

yaml
action: start
categories: ["devtools.timeline", "v8.execute"]
screenshots: false

Example: Example

yaml
action: stop
path: /tmp/performance-trace.json

พิมพ์ข้อความ

browser.type

พิมพ์ข้อความลงในฟิลด์อินพุต

Parameters:

NameTypeRequiredDefaultDescription
type_methodselect (placeholder, label, name, id, selector)NoplaceholderChoose the easiest way to identify the input field
targetstringNo-e.g. "Enter your email", "Email", "username"
selectorstringNo-CSS selector, XPath, or text selector
input_typeselect (text, password, email)NotextType of input field — use Password to mask the value in the builder
textstringYes-
sensitive_textstringYes-
delaynumberNo0Delay between keystrokes in milliseconds
clearbooleanNoFalseClear the input field before typing
timeoutnumberNo30000Maximum time to wait in milliseconds

Output:

FieldTypeDescription
browserobjectBrowser session (pass-through for chaining)
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
selectorstringพิมพ์ข้อความลงในฟิลด์อินพุต
methodstringType method used

Example: Example

yaml
type_method: placeholder
target: Enter your email
text: user@example.com

Example: Example

yaml
type_method: label
target: Email
text: user@example.com

Example: Example

yaml
type_method: placeholder
target: Password
input_type: password
sensitive_text: ${env.LOGIN_PASSWORD}

Example: Example

yaml
type_method: selector
selector: #email
text: user@example.com

อัปโหลดไฟล์

browser.upload

อัปโหลดไฟล์ไปยังองค์ประกอบ file input

Parameters:

NameTypeRequiredDefaultDescription
selectorstringYes-CSS selector, XPath, or text selector to find the element
file_pathstringYes-Local path to the file to upload
timeout_msnumberNo30000Maximum time to wait in milliseconds

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
filenamestringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
sizenumberสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
selectorstringชื่อไฟล์

Example: Example

yaml
selector: input[type="file"]
file_path: /path/to/image.png

Example: Example

yaml
selector: #file-upload
file_path: /path/to/document.pdf

ตั้งค่าหน้าต่าง

browser.viewport

รับหรือกำหนดขนาดหน้าต่างเบราว์เซอร์

Parameters:

NameTypeRequiredDefaultDescription
widthnumberYes1280ความกว้างของหน้าต่างเป็นพิกเซล
heightnumberYes720ความสูงของหน้าต่างเป็นพิกเซล

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ผิดพลาด)
viewportobjectขนาดหน้าต่างปัจจุบัน
previous_viewportobjectขนาดหน้าต่างก่อนหน้า

Example: Example

yaml
width: 375
height: 667

Example: Example

yaml
width: 768
height: 1024

Example: Example

yaml
width: 1920
height: 1080

Example: Example

yaml
width: 1366
height: 768

รอ

browser.wait

รอระยะเวลาหรือจนกว่าองค์ประกอบจะปรากฏ

Parameters:

NameTypeRequiredDefaultDescription
duration_msnumberNo1000Duration of the operation in milliseconds
selectorstringNo-CSS selector, XPath, or text selector to find the element
stateselect (visible, hidden, attached, detached)Novisibleสถานะที่ต้องรอ (แสดง, ซ่อน, แนบ, ถอด)
timeout_msnumberNo30000Maximum time to wait in milliseconds

Output:

FieldTypeDescription
statusstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
selectorstringสถานะการดำเนินการ (สำเร็จ/ข้อผิดพลาด)
duration_msnumberรอระยะเวลาหรือองค์ประกอบจะปรากฏ

Example: Example

yaml
duration_ms: 2000

Example: Example

yaml
selector: #loading-complete
timeout_ms: 5000

Released under the Apache 2.0 License.