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)
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 pageDocument 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.