Find all matching element in web

How to find all matching element in web and store in array

“find all matching element” => Can you please give an example website to clarify what you mean/need?

I want to create auto like news-feed in LinkedIn, It should click on Like button on visible area and then scroll down and click again if like button exists.

Use the POS attribute to select the 1,2,… n-th Like button, until you no longer find a Like button element. See here: Help in Dynamic table reading