Elements Exists ... using Peer Elements as part of query?

I have a situation where I have discoverd that the developer of a specific web application I have automation running against appears to have a element attribute issue.

This goes to the topic of looking for when a string is shown on-screen and when it is not-on-screen. To show the structure and showing element parent/child/peer relationships, here is a snap of Chrome inspect results:

The red lines on left shows the primary parent elements and and child-but-peers elements. Note that all three elements using a “style” attribute to control when something is display or not … mostly that is. The blue lines are showing the “style” attribute which is the on-screen vs not-on-screen control mechanism.

QUESTION: I’m looking to see if there is a some selector syntax magic that works with “Element Exists” where I can query both a parent and two at-the-same-level child elements within the same query.

EXPLANTION of the issue … rather tedious … my apologies.

I have found that the “spinnerContent” div does not maintain its style attribute consistently. After a bit of Chrome Inspect analysis I found the following. I have the parent and children indented below . This is showing what the “style” attributes have when something is on-screen vs not-on-screen (meaning block vs none as the style values). The indentation of textContext and spinnerContent lines shows they are peers and children of the bigMessage DIV.

(hopefully this makes sense)

  • bigMessage = block
    … textContent = none
    … spinnerContent = block
    *** Above means that likely “Loading Data…” message is being displayed … but this is a guess at best. “Loading Failed” could also be being displayed.

  • bigMessages = none
    … textContent = none
    … spinnerContent = block (this is the part that does not makes sense … this should be none … not block)
    *** “Loading Data…” is definitely not being displayed

  • bigMessages = block
    … textContent = block
    … spinnerContent = none (now this has the correct style setting !!!)
    *** “No Items to Display” is on screen

I’m essentially looking for when the string “Loading Data…” is on-screen and I wait for it disappear. If I use only the bigMessage style selector is basically works. However, there is a collision for the situation where “No Items to Display” is on screen because of the inconsistent using of the style attribute on the spinnerContent element.

Hoping someone knows of some magic peer selector syntax that came used with Element Exists.


we assume that you want to detect if the spinner is indicating the loading for synchronizations.

Whene working with Legacy framework you can use the following package and retrieve the CSS Property Values from the child element (when the CSS Property is inherit) or will use it agains the the defining Paren element ( when CSS Property is not inherit).

style attribute cannot be included within the selectors. So we always get the element and then using get Attribute / yourUiElementVar.Get(“style”) for further evaluations or other similar postevaluations. In a few case we also cannot rely on style /class markers as the CSS Cascade can overrule it. This was one of the motivations for creating the above mentioned activity.

However we would also recommend to have a look a the following:

  • the Parent Property of an UiElement of DataType UiPath.Core.UiElement
  • the FindFirst(), FindAll() method which we can use similar to the find children activity and can chain nested evaluations

Thank you for the reply. Yes, looking for on-screen/off-screen sync states essentially for a specific message (that being "Loading Data…).

This looks promising. I will take a look.

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