What container does an Element Exist need to be?

So i started touching an element that i worked on much time ago, and when i started to work back on it and attempt to run it, an error appears

Error UI-DBP-006 Container Usage Top level selector used outside scoped containers in activities Element Exists Element Exists ‘DIV’ Element Exists ‘DIV’.

Recommendation
Using scopes such as Open Browser and Application gives a level of reusability in selectors. Try to use scopes instead of direct UI Activities. Learn more.

And then i tried using Use Application/Browser and Attach Browser, and the issue is still on, i was wondering, what am i even doing wrong? or what’s the container?

Hi,

Can you try as the following?

  1. Put OpenBrowser or AttachBrowser/application surrounding the ElementExists and indicate browser/application
  2. Remove top level selector in Selector property of the ElementExists. Top level selector will be automatically set from the Open/Attach browser/application.

Regards,

@eduardo.ruelas

Try using the modern approach of Element Exists that is Check App State. This works without any scope required.

Hi @eduardo.ruelas

A container is a UI scope like Use Application/Browser or Open/Attach Browser.

This error means your Element Exists activity is using an old or top-level selector that is not properly scoped, even if it looks inside the container.

Re-indicate the element inside Use Application/Browser
Avoid mixing Classic and Modern activities
If it’s an old workflow, recreate the UI activity instead of reusing it

Hi @eduardo.ruelas

You should use the modern Check App State activity inside your Use Application/Browser container.
Be aware that this activity has two outcomes - Target appears and Target does not appear.

Also in some cases perhaps using validation on your other activities would achieve the same.
Eg. after clicking button X, verify that Button Y appeared.

Regards
Soren

Element exists doesn’t need any container it can be used without any container. Use modern approach ‘Check App State’

@eduardo.ruelas

First thing there error you are seeing is the workflow analyzer rule error..you can remove the rule as well

as per the rule every UI activity needs to be inside scope and this is applicable only to Classic activity

cheers