Skip to content

Element

DOM element query, attribute, and text extraction.

3 modules

ModuleDescription
属性を取得要素を取得
要素をクエリ要素内の子要素を検索
テキストを取得要素を取得

Modules

属性を取得

element.attribute

要素を取得

Parameters:

NameTypeRequiredDefaultDescription
element_idstringYes-要素ID(UUID)
namestringYes-要素ID(UUID)

Output:

FieldTypeDescription
statusstring属性名(例: href, src, class)
valuestring操作ステータス(成功/エラー)

Example: Get href attribute

yaml
element_id: ${link_element}
name: href

要素をクエリ

element.query

要素内の子要素を検索

Parameters:

NameTypeRequiredDefaultDescription
element_idstringYes-親要素ID(UUID)
selectorstringYes-親要素ID(UUID)
allbooleanNoFalse子要素を検索するCSSセレクタ

Output:

FieldTypeDescription
statusstringすべての一致する要素を検索するかどうか(デフォルト: false、最初のみ検索)
element_idstring操作ステータス(成功/エラー)
element_idsarray操作ステータス(成功/エラー)
countnumber見つかった要素ID(単一モード)

Example: Find child element

yaml
element_id: ${result_item}
selector: h3

テキストを取得

element.text

要素を取得

Parameters:

NameTypeRequiredDefaultDescription
element_idstringYes-要素ID(UUID)

Output:

FieldTypeDescription
statusstring要素ID(UUID)
textstring要素ID(UUID)

Example: Get element text

yaml
element_id: ${title_element}

Released under the Apache 2.0 License.