Finding all links in a web page to check the validity

HI,

I have to Navigate to each page in a website and identify and navigate to the child links inside them.The child links can be present anywhere ,under various tabs etc.
I need to click on each link to see if it is working.
Please suggest how do we do it.
PS:Tried data extraction but it did not work.Find child elements is not returning anything

Thanks

Hello @mudit,
You could try to get website source and keep it as string and with use of Regex or Substring search for elements having “http” or “www” inside html link code.

1 Like

Hi Pablito,

Appreciate your response.
Could you please provide me with a simple example to explain the case.

Mudit

@mudit,
You need to install additional package UiPath.Web.Activities then use HTTP Request activity from it.
(I will show example based on www.uipath.com site):
image
Then go to Response tab
image
Mark to download source and choose path
image
This will save you a file with full source of website with all links inside of it:
image

Now you can get this file with Read Text File activity and assign everything into string and using Regex or Substring you can get each http site one by one :slight_smile:

1 Like

I am not taking about a single web page.I am saying i enter a website that span across 20 pages.Each page has almost 100 links available under various sections.Can this be done through this ?
Thanks

You can just get links based on what I showed you and then with use of those links navigate to each subpage/website and again get source and so on.

I tried by using HTTP request activity with GET method. Below is the error message I received:

HTTP Request: A required privilege is not held by the client.

Please help me out.