How to use a regex selector which matches multiple UI-Elements?

I have a list of items in my DOM, which seem like this:

<h2>Item: X...</h2>
<h2>Item: Y...</h2>
<h2>Item: Z...</h2>
...

I would like to use the following selector in a GET TEXT activity, which should find all of them at once, and write in a variable/array etc. Is it possible?

<webctrl aaname='^Item:.*' matching:aaname='regex' />

At the moment it just finds the first one (Item: X…).

Alternatively, i can also describe my regex to select the nth child if possible, but this does not seem to work. Sth. like this:

<webctrl aaname='^Item:.*[1]' matching:aaname='regex' />
<webctrl aaname='^Item:.*[2]' matching:aaname='regex' />
<webctrl aaname='^Item:.*[3]' matching:aaname='regex' />

Hi,

In this case, we need to use FindChildren activity.

Hope the following sample helps you.

Sample20220115-2.zip (2.9 KB)

Regards,

1 Like

ok thank you.

BTW, i do not have any “Find Children” activity in my tool. I think it has somehow sth. to do with the project settings… My version of the Studio Tool (the last version) does not also show “Classic Activites” which also includes “Open Browser” activity. I have “Use Browser” instead of “Open Browser”.
If i create a process with the Windows Legacy Mode, i think i will see them… But i do not want that. Do u know what the equivalent of Find Children in new mode?

Hi,

Which compatibility do you use? We can use FindChildren inside Use Browser in Windows compatibility (not legacy) as the following.

Regards,

I use Cross-platform

Hi,

Unfortunately, it doesn’t seem to support FindChildren at this time. If possible, can you try Windows (.net5) compatibility?

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.