cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to click a child object

SOLVED
Highlighted
Occasional Contributor

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

The behavior of the Link objects will only show if only the ChildObject is clicked.

Objects Structure Example:

 

Parent Object

  --->ChildObject1
      --->Link
  --->ChildObject2

      --->Link

  --->ChildObject3

      --->Link

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Leader

Re: Best way to click a child object

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();
    }

 

Un sourire et ça repart

View solution in original post

2 REPLIES 2
Highlighted
Community Leader

Re: Best way to click a child object

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();
    }

 

Un sourire et ça repart

View solution in original post

Highlighted
Occasional Contributor

Re: Best way to click a child object

Thanks!

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors