how can i use While Loop to capture all (e.g.) a tags?


I am attempting to capture all the <a> tags on a web page, then logging all the hrefs from those a tags. Not sure how to get started, other than using the Loop action.


Best answer by Bot Dev 24 May 2024, 00:09

View original

2 replies

Userlevel 2
Badge +6

you could use Loop While Recorder:Capture Object exists - then use wildcards in the selection for the capture so it can be iterated through.

A better way would be to captue the webpage as a file, then use a string operation to find each instance of the “<a href=” string and extract the url using something like a regular expression.

There are many different ways to perform this operation, you might need to go back and redefine the process.

Userlevel 2
Badge +6

Try this:

Use Search with selector activity or Simple search for elements by tag