Any Alternative for selector?

I did web automation using selector in one of my project. But In client side monthly once they are performing website maintenance. Every month selector getting change for few elements but User interface remains same. So, We have any other alternative for selectors?

Hi @BNK

Use the Get Attribute activity and you can get the attribute values from that. So you need to place the Get Attribute activity within the Use Application/ Browser and y can get the attribute values from that respective page.

image

Regards

If there are changes in the application UI (e.g., the structure of elements changes), having an object repository allows you to update the selectors in a single location rather than searching through all your workflows.

@BNK

  1. Use Wildcards:
  • Identify the changing part of the selector.
  • Replace the changing part with an asterisk (*) in the selector.
  1. Use Partial Selectors:
  • Identify the stable part of the selector.
  • Use only the stable part in your selector.
  1. Use Anchor Elements:
  • Find stable elements close to the changing elements.
  • Use them as anchor points in your selectors.
  1. UI Explorer:
  • Utilize UiPath’s UI Explorer.
  • Inspect elements, highlight them, and modify selectors as needed.
  1. Dynamic Selectors:
  • If the changing part follows a pattern, use dynamic selectors.
  • Insert variables or expressions in the selector to adapt to changes.
  1. Retry Scope:
  • Wrap your activities with changing selectors in a Retry Scope.
  • Allow the automation to retry a few times if selectors fail.

Hi I want to perform Web automation with out selector concepts. Because in my project client is asking permanent solution. So, In UiPath we have any other alternative options.

On possible way is to use JavaScript Injection:

  • Use the “Inject JS Script” activity to execute JavaScript code directly in the browser.
  • Perform actions by manipulating the DOM using JavaScript.

You can try with Object repository
-When the selectors change during monthly maintenance you only need to update the Object Repository file rather than modifying the workflow itself. This makes maintenance more straightforward.

Can i use Computer vision? . Because Computer vision is alternative for selectors

Hi @BNK

As you mentioned, Computer Vision can be helpful for dynamic interfaces where selectors frequently break. Train custom object classifiers to recognize visual elements regardless of their technical properties.

Cheers…!