In this post we will discuss one of the common question asked by many readers of ExecuteAutomation, which is the topic name.
Its actually fairly very simple though, I just wrote 10 lines of code to achieve it (you might have even better solution than one I have)
So, here is the pseudo code
- Navigate to the URL of site you are interested in
- Get all the links of page using FindElements(By.Tag(“a”)) method
- Iterate through the page URLs and get the attributes href using GetAttribute(“href”) method
- Use Simple WebRequest and HttpWebResponse class to get the page response and status code.
So, here is the output
Here is the source code
Thanks for reading the post and watching the video!!!
Please leave your comments and let me know if there is anything I should update in this post.