TestProject Forum
Powered by leading experts in the test automation community

Couldn't catch dynamic identifier on runtime

Hi everybody. I try to catch a select combo/input to click on it but it has a dynamic suffix on id tag and the test skip that.
the rest of input tags has a name identifier and this works.

The form is like

You could open the combo list or directly enter a value on it.
The code inspect show:

On every run, the numeric part on id “mui-59905” changes. So, is different from script record.
The next combo list (Empresa) also have a different suffix number from the previous combo (Rol)

I can’t click or type a text on it because I can’t catch it.
Is there a chance to catch it?

This changing values doesn’t seem to appear in any place on the rest of page to get it.

Thanks for all.

Hello @marianosckerl.

If the ID changes dynamically, you’ll need to create a generalized locator that will be able to catch it without the ID.

Please look here for additional details: