can i use the same , if so how . thanks :)
e44e5d77-2309-42d0-9543-40a4ca778ba7-image.png
I need to randomly click on a link in a website. I did a loop with the XPATH of tag A then generated a random index number to select the link to click.
The problem is that there are A tags of the element that are not visible to the browser (like the A tag of the dropdown-item), how to click on that element or skip it.

What I mean is how to remove elements that are not visible to the browser to avoid clicking on them.
Thanks.