Unable to get total number of links on a web page - 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: Unable to get total number of links on a web page (/Thread-Unable-to-get-total-number-of-links-on-a-web-page) |
Unable to get total number of links on a web page - RGummadidala - 02-13-2011 Hi all, Can anybody please help me on this code. Code: Dim odesc When i am running the code i am getting this error. General : Run time erro Line (10): Code: "Links=Browser(odesc).Page(odescp).ChildObjects(odescL)". Thanks, Rgummadidala. RE: Unable to get total number of links on a web page - markQA - 02-14-2011 Turn off the Regular Expression.. Code: odescp("micclass").RegularExpression = False RE: Unable to get total number of links on a web page - jsknight1969 - 02-16-2011 Might just be a typo but Code: odescL("micclass").value = "Link" RE: Unable to get total number of links on a web page - Rekhapramod - 02-16-2011 Hi, Use the below code Code: Set Desc1=Description.Create() RE: Unable to get total number of links on a web page - RGummadidala - 02-17-2011 Hi All, I have corrected the typo error "Links" in my code and now the code looks as below (this is taken from some other thread in this forum) Code: Set oBrowserDescriptions = Description.Create () When I ran this, it is failing when invoking some method on "Browser" object like "Browser(oBrowserDescriptions).Exist()" or "Browser(oBrowserDescriptions).Navigate("http://www.yahoo.com" )", as if some kind of NullPointerException in java or some other language. The exact error message I see here is Cannot identify the object "[ Browser ]" (of class Browser). Verify that this object's properties match an object currently displayed in your application. Line (8): Code: "Browser(oBrowserDescriptions).ClearCache". From the error, it appears as if Browser object was not created. Do I need to create the Browser object explicitly or for that matter, how does this work in Descriptive Program. Many examples which I saw in other posts and forums, the skeleton remains the same as above, but some how it is failing or apparently I'm missing something here. |