Get total links visible on a webpage - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Get total links visible on a webpage (/Thread-Get-total-links-visible-on-a-webpage) |
Get total links visible on a webpage - Sanjay_DP - 02-10-2011 Hi, I tried fetching all the links on a webpage using the following code. Code: Set oDesc = Description.Create() But it returns me links which are even not visible on the page. I would like to get only a set of visible links on the current page. I tried using the "Visible" property as well but it reruns 0 objects. RE: Get total links visible on a webpage - Rahull - 02-10-2011 Hi, Try to find the "unique" property by comparing the visible link and non visible link using the getroproperty. Then specify the same in description. --Rahul RE: Get total links visible on a webpage - supputuri - 02-11-2011 Hi, describe below property too. Code: oDesc("Visible").Value = "True" And now try to run and let me know if it does not solve your issue. RE: Get total links visible on a webpage - Sanjay_DP - 02-11-2011 Hi, It returns 0 objects if set: Code: oDesc("Visible").Value = "True" RE: Get total links visible on a webpage - DinakarVadapalli - 02-11-2011 Code: Set oBrowserDescriptions = Description.Create () RE: Get total links visible on a webpage - Parke - 02-16-2012 visible is boolean so use = True with no quotes Code: Set oDesc = Description.Create() on 2012-02-16. there are 40 links. 21 links have visible = True Run the code with visible active and not active. hth, Parke |