Forum Discussion
3 Replies
Sort By
- Hi uday,
Here's an example:function test()
{
var page = Sys.Process("iexplore").Page("*");
Log.Message(getLinksCount(page));
}
function getLinksCount(page)
{
var links = page.FindAllChildren("ObjectType", "Link", 9000);
links = (new VBArray(links)).toArray();
var linkscount = 0;
linkscount = links.length;
return linkscount;
} - Udayreddy_90ContributorHow can we write the same thing in VBScript.
Hi uday,
Here's the VBScript version of the routine:Sub Test
Dim Page
Set Page = Sys.Process("iexplore").Page("*")
Log.Message GetLinksCount(Page)
End Sub
Function GetLinksCount(page)
Dim Links, LinksCount
Links = page.FindAllChildren("ObjectType", "Link", 9000)
LinksCount = 0
LinksCount = UBound(Links)
GetLinksCount = linkscount
End Function
Related Content
- 6 months agomacheshmeh
- 9 months agoenschim
Recent Discussions
- 8 hours agoSvetaG