How to make sure the element is found when its name keeps on changing?

I am trying to enter the record in the Oracle Sequence Assignment window. It looks like this

As you can see there are two tabs which got different fields and I need to enter data in both tab’s fields.

I am using Send Hotkey activity to get the specific field, first field(in the pic) Application.

But I am getting different values in the selector, the following are the 3 cases.

1)When this window is open sometimes the name in the selector is like(in the pic)

2)When this window is open sometimes the name in the selector is like(in the pic)

3)After opening the window, if I navigate to Assignment tab and comes back to enter the data in Document tab the name in the selector changes(in the pic)

.

How can I set this name to dynamic
I tried adding a ‘*’ at first but it also didn’t work.

How can I solve it?

Hi @manzar_ali

The ‘*’ that you’ve added at the beginning was followed by a space or something?

This is just to make sure before trying other methods.

Regards,
Reda

You have to figure out the commonalities between the variations.
In this case, can you generalize your selector to look like this?

I’ve put in only the sections that need to be changed, the rest will most likely remain the same.

title='Oracle Applications - GTICL*
java name = '*Application*Required*Values*' 

Also I recommend that you take a look at any of the Unselected attributes to see if there is a common attribute and include it in there.

Hi @reda , I am not adding anything after that.

Hi @AndyMenon The commonalities between the variations are

1.Document tab page Application RequiredList of Values
2.Assignment tab page Document tab page Application RequiredList of Values
3.Application RequiredList of Values

There are no others Unselected attributes, I have checked it in UIExplorer

Ok, so then you should use the common attributes to build a selector. Based on your inputs, this is most likely how your selector would look like after you’re done:

<wnd app='java.exe' cls='SunAwtFrame' title='Oracle Applications - GTICL*'/> <java name ='Sequence Assignments' role = 'internal frame' /> <java name = '*RequiredList*Values*' role ='text'/>

Although you’re getting multiple variations, the selector

Assignment tab page Document tab page Application RequiredList of Values

looks to be the accurate one. If you observe carefully, the first parent of your values field is the outer Assignment Tab, and then the second parent is the inner Document tab. But as you’re getting variations, you’ll have to generalize it as what’s shown in the selector I’ve published above.

Also, you might want to remove the cls attribute and try if the selector works. This is a Java application and the class names are not expected to change overnight, but if your selectors can work without class names that would be a good way to go.

I hope this helps.

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