---
title: "How to check all the links dynamically?"  
description: "How to check all the links dynamically?"  
author: "Anonymous User"  
published: 2013-06-20  
updated: 2013-06-20  
canonical: https://www.mindstick.com/forum/1232/how-to-check-all-the-links-dynamically  
category: "vb script"  
tags: ["vb script"]  
reading_time: 1 minute  

---

# How to check all the links dynamically?

Hi [Expert](https://www.mindstick.com/articles/13120/an-expert-financial-advice-will-improve-your-finances),\
The following thing I have to do using VBScript in QTP 10/11:\
The VBScript [opens](https://www.mindstick.com/news/2570/china-s-new-space-station-opens-for-business-in-an-increasingly-competitive-era-of-space-activity) one [login](https://www.mindstick.com/articles/12852/styles-login-form-in-android) [page](https://www.mindstick.com/articles/13031/why-to-make-a-wikipedia-page). After the login it [counts](https://yourviews.mindstick.com/view/81419/it-s-what-you-don-t-say-counts) the number of [links](https://www.mindstick.com/blog/415/css3-links) in that page and then prints all the links. Afterwards it opens every [link](https://www.mindstick.com/articles/23633/link-builder) one by one.\
I am having [issues](https://www.mindstick.com/articles/12944/mattresses-for-kids-and-mothers-should-meet-certain-criteria-issues-you-should-consider) with finding all the [dynamic](https://www.mindstick.com/blog/11080/features-of-java-dynamic-complied-and-interpreted) links.\

## Replies

### Reply by Sumit Kesarwani

Hi,\
You can get all the links on a page by using the Page's (or Frame's) ChildObject method.\
Set desc = Description.Create()desc("html tag").Value = "a"Set links = Browser("B").Page("P").ChildObjects(desc)For i = 0 to links.Count - 1 Print links(i).GetRoProperty("inner_text") & " => " & links(i).GetRoProperty("href")NextAs for clicking them, that's a bit more complicated since after clicking a link you cause a navigation that invalidates the links object, you should either perform \
the ChildObjects each time (while keeping track of the index) or open the links in a different browser/tab.\


---

Original Source: https://www.mindstick.com/forum/1232/how-to-check-all-the-links-dynamically

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
