Bỏ qua tới nội dung chính
DemoZalo 0862020654

Tương tác

Lấy text

Lấy nội dung text của một phần tử

Mã block: get-text

Bảng cấu hình của khối Lấy text trong trình soạn workflow.
Bảng cấu hình của khối, đúng như trong trình soạn thảo.

Đầu vào

TênKiểuMặc địnhMô tả
disableBlockbooleanfalseTắt khối này
descriptionstring—Mô tả khối
findByselectcssSelectorLoại selector
cssSelectorxpath
selectorbắt buộcstring—CSS selector hoặc XPath
waitForSelectorbooleanfalseChờ selector xuất hiện
waitSelectorTimeoutnumber5000Thời gian chờ selector (ms)
markElbooleanfalseLàm nổi bật phần tử
multiplebooleanfalseChọn nhiều phần tử
regexstring—Regex để tách nội dung từ text
prefixTextstring—Text thêm vào đầu
suffixTextstring—Text thêm vào cuối
includeTagsbooleanfalseGiữ cả thẻ HTML
useTextContentbooleanfalseDùng textContent thay cho innerText
addExtraRowbooleanfalseThêm dòng phụ vào bảng
extraRowValuestring—Giá trị của dòng phụ
saveDatabooleantrueChèn vào bảng dữ liệu của workflow
dataColumnstring—Tên cột trong bảng
assignVariablebooleanfalseGán vào biến
variableNamestring—Tên biến

Đầu ra

  • textstring

    Extracted text