Choosing nearest target from anchor

Dear UiPath Masters,

I was going to choose the edit button on the same row as the anchor which has particular text. I remembered there was a feature where I could choose the nearest target from the anchor, but I lost it.

Is there any of you know about the feature I mentioned? or any alternative to get the same goal?

Thank you in advance and best regards,
Tyo

@Tyo_007

Welcome to the community

Two ways

  1. You can use for eqch ui element activity and click on each edit button you need it has a filter where you can filter on what you need
  2. Use a selector whoch contains innertext and use variable inplace of innertext…selector looks like below
<webctrl tag='TD' innertext='{{VariableToSelectRequiredValueFromColumn2}}' tablecol='2' />
<nav up='1' />
<webctrl tag='TD' tablecol='5' />
<webctrl tag='A' />

This is for illustration use ui explorer and find the exact selector…nav up is somethingthat is added

Cheers

1 Like

Hello @Tyo_007

  1. Click Text Activity:
  • Use the “Click Text” activity.
  • Indicate the target area using the specific text as an anchor.
  • Configure the activity to click on the desired button.
  1. Click OCR Text Activity:
  • If the text is in an image or not selectable, use “Click OCR Text” with OCR recognition.
  • Indicate the target area using OCR recognition.
  • Configure the activity to click on the desired button.
  1. Anchor Base Activity:
  • Use the “Anchor Base” activity for more flexibility.
  • Place your activities inside it, indicating the anchor text and the target button separately.

Thanks & Cheers!!!

Thank you for welcoming me!

Anyway, I’ve tried this but it’s kinda difficult because the row might change whenever we generate a new report.

So at first it might be at 2nd row, but tomorrow it could be at 4th row…

It is possible to implement this if the element is static, perhaps?

Anyway, after trying several features you’ve mentioned, I finally found the feature that I meant. But it’s on another project, not the project I’m doing for generating this report.

Do you know how it is not available on a particular project?

Thanks!

@Tyo_007

if you see the selector given I am not using tablerow anywhere so where ever it is based on the text value which is a variable it will pick that particular row as needed

cheers

Thanks for the solution @Anil_G, finally solved it with the inner text and removing the row selector…

I have tested it with similar innertext too, and the selector wasn’t confused!

Big thanks and regards!

1 Like

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