Count and save in variable number of elements present in a page

Hi

what solution can i use to count the number of elements in a page and save the number in a variable ?

I add an image to better understand what I mean

I need 3 variable with saved 5 (number of element for group of link).

Here the original page, see footer

https://ui.vision/

Need to predict case with 0 element

What solution can i use to do this ?

Thanks

1 Like

Maybe sourceSearch | regex=... | count if you can create/find a good regular expression.

Thanks but i can not find a simple solution to do this.

If some users can help me to create a macro code for this will be appreciated

Snippet




Edit
Edit
Edit

{
“Name”: “Whatever”,
“CreationDate”: “1977-12-31”,
“Commands”: [
{
“Command”: “sourceSearch”,
“Target”: “regex=edit”,
“Value”: “editLinkCount”
},
{
“Command”: “echo”,
“Target”: “${editLinkCount}”,
“Value”: “”
}
]
}

1 Like
Edit
Edit
Edit