Skip to content

Element

DOM element query, attribute, and text extraction.

3 modules

ModuleDescription
Lấy thuộc tínhLấy phần tử
Truy vấn phần tửTìm phần tử con trong phần tử
Lấy văn bảnLấy phần tử

Modules

Lấy thuộc tính

element.attribute

Lấy phần tử

Parameters:

NameTypeRequiredDefaultDescription
element_idstringYes-ID phần tử (UUID)
namestringYes-ID phần tử (UUID)

Output:

FieldTypeDescription
statusstringTên thuộc tính (ví dụ: href, src, class)
valuestringTrạng thái thao tác (success/error)

Example: Get href attribute

yaml
element_id: ${link_element}
name: href

Truy vấn phần tử

element.query

Tìm phần tử con trong phần tử

Parameters:

NameTypeRequiredDefaultDescription
element_idstringYes-ID phần tử cha (UUID)
selectorstringYes-ID phần tử cha (UUID)
allbooleanNoFalseCSS selector để tìm phần tử con

Output:

FieldTypeDescription
statusstringCó tìm tất cả phần tử khớp không (mặc định: false, chỉ tìm phần tử đầu tiên)
element_idstringTrạng thái thao tác (success/error)
element_idsarrayTrạng thái thao tác (success/error)
countnumberID phần tử tìm thấy (chế độ đơn)

Example: Find child element

yaml
element_id: ${result_item}
selector: h3

Lấy văn bản

element.text

Lấy phần tử

Parameters:

NameTypeRequiredDefaultDescription
element_idstringYes-ID phần tử (UUID)

Output:

FieldTypeDescription
statusstringID phần tử (UUID)
textstringID phần tử (UUID)

Example: Get element text

yaml
element_id: ${title_element}

Released under the Apache 2.0 License.