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.
Hi @gokulvasant ,
Use Http Request Activity
Input->EndPoint ->Give the Url here (row value)
Output->StatusCode-> create int variable (intvalid)
if intvalid is equal to 200
then valid url
else invalid url.
validate site url.xaml (5.6 KB)
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.
What if i have list of urls and i need to validate Them.
I know status code 200 implies for valid url.
If suppose i land to a webpage of a specific website and it gives me an error as “Page Not found” ?
In this case also the code is 200 for valid url but i am also getting 404 which is page not found
How do i extract the 404 code from this one?