Whether function can return number of links and their names in 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: UFT / QTP Interview Questions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Interview-Questions) +--- Thread: Whether function can return number of links and their names in a web page (/Thread-Whether-function-can-return-number-of-links-and-their-names-in-a-web-page) |
Whether function can return number of links and their names in a web page - kotaramamohana - 06-27-2012 Hi Friends, Whether function can return number of Links and their names in a web page. I have tried but I am getting error as "Wrong number of arguments or invalid property assignment" Here is my code: Code: n=abc() Can you please share your ideas RE: Whether function can return number of links and their names in a web page - ssvali - 06-27-2012 Try the below code Code: oval= lnkCount() RE: Whether function can return number of links and their names in a web page - kotaramamohana - 06-27-2012 Thanks Ssvali, Its working fine. RE: Whether function can return number of links and their names in a web page - elango87 - 12-07-2012 Your approach is right. Instead of using abc = objlink, you should have used abc = objlink.count() and in place of msgbox = n.count, you should use msgbox = n below is the modified version of your code. -- Code: SystemUtil.Run "iexplore.exe", "google.com" hope this helps. Thanks, Elango |