Dynamic Selectors Pega

Hello,

I have an issue with the webpage I am interacting with, where the selector is currently defined as below but the ID can change every time it refreshed:

<html app='chrome.exe' title='Hello' /> <webctrl id='PegaGadget2Ifr' tag='IFRAME' /> <webctrl tag='SELECT' />

I tried a regex in the selector ID but it still doesnt work. Any ideas?

<html app='chrome.exe' title='Hello' /> <webctrl id='PegaGadget(1|2|3|4|5)Ifr' matching:id='regex' tag='IFRAME' /> <webctrl aaname='Hello' tag='LABEL' /> <nav up='1' /> <webctrl tag='SELECT' title='New' />

hi @HMJason ,

I believe you are classic selector here to do the automation -

If possible , Try switching to modern experience - This would create a lot more details to your selector.

Else ,

we can try the following options :

  1. We can use anchor base activity.
  2. Find relative activity can be explored.
  3. Use the Ui Explorer and see if we any more attributes which can uniquely identify the element.

I’ve tried to use the anchor base and other attributes to identify the element but no luck.
Can I switch to modern experience for existing projects? It looks like it only applies to new projects.

You can go to activities : filter : add modern and try this in a new sequence

Hi :wink: use the wildcard *

<html app='chrome.exe' title='Hello' /> <webctrl id='*' tag='IFRAME' /> <webctrl tag='SELECT' />

Grettings

Hi @HMJason Can you try removing the id from the selector. It looks like you’re using Anchors as the selector has . Does it not working with normal selector?

Hi @HMJason ,

Could you let us know when you mean it doesn’t work, Does it not highlight the UI Element as well or is it a runtime execution issue ?

We also see that in the Selector provided, you have two instances named Hello, maybe you are trying to mask this, but do you think this anchor is a stable one, we ask this because you have provided two id the same names title and aaname.

Let us know if you are to highlight the UI Element else we need to make it work at first.