Container usage error and Large idx in Selectors error

I keep facing these two errors when running my bot:

  1. “Top level selector used outside scoped containers in activities”
  2. “Selector from activity contains large IDX number. Threshold is 2”

Hi @justaskingquestions

Only use top-level selectors inside containers like Use Application/Browser.

what does it mean by top level selectors?

@justaskingquestions

It means you have to first open the app or browser using activity like Use Application/Browser. then, inside that, you can use smaller actions like Click or Type Into. If you skip the container and use full selectors directly, this error shows up. &
Avoid using selectors with idx=3 or higher. Use better attributes or anchors instead.

Happy Automation

Hi @justaskingquestions

If you get the time, the UiPath Academy is actually a great place to find more info on selectors, descriptors and best practices.
I would suggest the two courses below as a good introduction - hope you find it interesting :slight_smile:

Best Regards
Soren

I’m assuming our selector uses idx=3 because the “switch profile” button appears in the 3rd row of selection as shown in the image. So its not possible for us to use idx 2 as it might select a different button instead.