Forum Discussion

malmario's avatar
malmario
Occasional Contributor
4 years ago
Solved

Best way to click a child object

Hi, What my script does is click the ChildObject then click the 'Link' object under it. I can do that by mapping each ChildObject but is there any better way to not map each ChildObject and Link ...
  • BenoitB's avatar
    4 years ago

    You can browse all links directly:

     

        let links, linksCount;
        links      = Sys.Browser("*").Page("*").contentDocument.links;
        linksCount = links ? links.Length : 0;
        for (let i = 0; i < linksCount; i++) {
          links.item(i).Click();
        }