Check Href link exists or not

community

#1

Dear All,

Am having output in data table, from this data table I want to check each row consists valid href link. If href link exits need to click that and certain operation to be done. Or if the link doesn’t exists another operation to be done. I would like to know how to check particular row contains href links or not. Please help me out the same.

Thank you,
Gokul


#2

Hi @gokulvasant ,

Use Http Request Activity
In Properties
Input->EndPoint ->Give the Url here (row value)
Input->Method->Head
Output->StatusCode-> create int variable (intvalid)
if intvalid is equal to 200
then valid url
else invalid url.

For reference
validate site url.xaml (5.6 KB)

Regards,
Arivu


Need help to detect web page down
How to check the status of URLs in Excel and get the out put excel with status codes
Download file via HTTP request - check for error
Creating Exception for a Broken URL
#3

If you know the column name which contains href, you can bifurcate using DataTable Select and get the ones with link in one DT/no links in another DT and perfrom your operations.

dtLinks = dtTbl.Select("[ColName] Like '%href%').CopyToDataTable

Then perform above step provided by @arivu96 to check the validity.


#4

Hi ,

What if i have list of urls and i need to validate Them.