Use regex for different selectors

Hey community,

I Use the CheckAppState activity to check if there is a function to switch languages on the website. As this function is often provided with a toggle switch and sometimes in dropdowns or just through the selection of a country flag, I need to check each of the possible ways.

Therefore it’s possible that I find the element with the class attribute, sometimes with the aaname or the innertext. Is there any way in which I can test all of these in just one activity with a regex?

Thanks a lot for your help in advance! :slight_smile:

have a look here:

Hey thanks for the quick respronse. Unfortunately I don’t think this is what I looked for. I also work with the matching:…='regex"

I would need a mehtod with which i could match different tags as well.

for example:


maybe some things are merged too much

as the innertext and the aaname can differ (depends on browser) but can be assumed as redundant, so we can focus only on the innertext.

about the additional handling of the class info we would recommend if this is really in that way that class and not innertext OR innertext and not class will make the selector unique / stable

We dont know all your details, but maybe you can retrieve the element and evaluate it on the different attributes in a custom way.

Can you share some more details on the element structure, screenshots?

I have like an infinite number of websites to check. Because of that, the elements differ every time. Thats also the reason why I’d like to merge a lot. Otherwise the workflow will become too large I think.

Maybe there is no more beautfiul way of doing so… Thank you for your advices. :slight_smile:

in such a case we had some more options:

  • find children - post evaluation of the result
  • grabbing the html e.g. innerhtml/outerhtml attribute - post evaluation on text/XML level
    • using the calculated information for the discrete element access
1 Like