Skip to content

How to get each element of the list? #181

Answered by Kholid060
isaced asked this question in Q&A
Discussion options

You must be logged in to vote

Automa doesn't have a feature like loop-elements. But if you want to get the text content from multiple elements, you can check the multiple checkbox like the image below. It will get all the text content from all the elements that match the selector.

Or you can use the javascript code block and write the code like below

const elements = document.querySelectorAll('.selector-here');
const textContent = Array.from(elements).map((element) => element.innerText);

automaNextBlock({ column: textContent })

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@techflag
Comment options

Answer selected by isaced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants