Type Into Activity Dynamic Index Set

Hello Team,

We have a webpage contain user flow in below format

Initial Screen

We need to perform the Following activity in the Initial Screen
1.We click Add New User to add new username

2.After Clicking below screen appears

3.In this step we are getting issue here in type into activity
image

4.It requires Index Element to be present in the Type into.
But the Index of Type into keeps changing based on the Previous Elements that are present

Example: In this case the index would come to 2 for the type into Activity
Because AOD and NQD are already present

But if there were three users already present in flow(AOD , NQD , QND)then index would come to 3 for the type into Activity

  1. How can we set the index dynamically based on no of elements already present in the flow

Thanks team in Advance for your ideas and suggestion

@NISHITHA,

Use UI explorer to find more attributes of the element to make the selectors more dynamic and no relying on index.

Thanks,
Ashok :slightly_smiling_face:

@NISHITHA

  1. Try identifying different attributes to make it more stable…generally new one should be an editable tag and remaining would be non editable try using something like that
  2. if 1 does not work then use find children or for each ui element and last element will be the element you need as per explanation

Hope this helps

cheers

Thanks @ashokkarale for the prompt response

@Anil_G Can you help by explaining it in more detailed and stepwise way

Thank you

@NISHITHA

Which option you would want to try? and where are you stuck implementing it?

cheers

@Anil_G

We need to use type Into

Into the Rectangular Textbox

So the point 2. that you specified How can we implement that approach

@NISHITHA

idicate the element in find children activity and give the filter with tag and any other attribute which are same…or give the last selector her. make sure tos elect descendants in the properties

then from the outputvar use outputvar.Last to get the last selector which can be used as input for your next activity which is type into

cheers

Thanks @Anil_G

Will definitely try this approach :+1:

1 Like

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