How to handle selectors with dynamically changing web IDs?

Hi,

I am trying to give some input text using ‘type into’ activity to 5 ‘text boxs’ in a webpage. however, the webID is changing dynamically so often.

following is the detailed explanation of selectors for text boxes:
for
1st text box
<webctrl id=‘d7388282e233’ tag=‘INPUT’ />
<webctrl id=‘d7481380e233’ tag=‘INPUT’ /> (change in webID, after refreshing the webpage)

2nd text box
<webctrl id=‘d7388282e243’ tag=‘INPUT’ />
<webctrl id=‘d7614283e243’ tag=‘INPUT’ />(change in webID)

3rd text box
<webctrl id=‘d7614283e253’ tag=‘INPUT’ />
<webctrl id=‘d7642274e253’ tag=‘INPUT’ />(change in webID)

4th text box
<webctrl id=‘d7614283e264’ tag=‘INPUT’ />
<webctrl id=‘d7642274e264’ tag=‘INPUT’ />(change in webID)

5th text box
<webctrl id=‘d5190765e274’ tag=‘INPUT’ />
<webctrl id=‘d5398720e274’ tag=‘INPUT’ />(change in webID)

i have replaced web id with wild card (<webctrl id=‘d*e233’ tag=‘INPUT’ />) . but, sometimes the number 233 is also changing dynamically.

i can’t use the web id as <webctrl id=‘*’ tag=‘INPUT’ />, because i need to give input for 5 text boxes in a row.

to solve this i tried to use click image activity and type into the text box. but the processing speed is slow using click image activity.

could you suggest me a optimal solution for dealing selectors with dynamically changing web ids.

Thank you :slight_smile:

best regards,
Susheel

Hi there @susheel.chandra,
Have you considered an Anchor Base?

You can leverage a label, then find the nearest INPUT tag.

Thanks in advance,
Josh

1 Like

You could just add another wild card <webctrl id=‘d*e*’ tag=‘INPUT’ />
What it looks like is that it increments by one for each field you go to.

For the field e233, if you look it increments the last two numbers by ten.
So the next one is 243…253…etc…
If it always increments whatever the number is by ten, you could
store the first number value into a variable, put it in a loop, and increment that number variable by 10 each time it goes through the loop.

Hi @susheel.chandra,

Use * instead of using ID value.
Try to use UiExplorer to get more attributes like name, aaname,title,etc,.

So you can diffenciate the textboxes.

hi Josh,

Thanks for the information. i will check with anchor base.
and for other alternative i am using click image activity.

best regards,
Susheel

hi there @HsDev ,

thanks for your inputs. however, those numbers are changing randomly. i dont see any sequence in the numbers.

hi Akila,

thanks for your reply. i have tried with uiExplorer with other attributes. but it didt worked.
may be image recognition works here.

best regards,
Susheel

Hello!

The best approach is to use anchor base as mentioned by Mr_JDavey :slight_smile:

I don’t recommend the use o Click Image activity for this. It may cause some problems in the future.

Regards,

1 Like