Unable to fill in the correct fields

Hello everyone.
please, I have a scenario who looks like this:

user must :
1- click on the add field link
2- fill in the new empty ields displayed
3 - click on save btn

expected result :
-The program must fill in new empty fields displayed

actual result :
-The program fills in other fields, instead of filling in the new empty fields i expected.

question : how can I point to these new empty fields so that the program fills these fields?

UI:
image

Have you tried to make an array of your first row as your second row? If you have a xpath to the first item of the first row as //input[@id="champId"], then make the xpath to the second row like, (//input[@id="champId"])[1]. Make sure you enter text something different than “TEST KATALON” so you can see if the array reference worked.

Or if the xpath of the first item of the first row has an identifier that has something like “xxxxxx_0_xxxx”, then change the zero to a one, so it becomes “xxxxxx_1_xxxx”. Just copy and paste the element and then change the xpath reference (and the name obviously–I just add the suffix, Two).

morning dear @grylion54
I did not quite understand your suggestion, because I am not familiar with the tables.
if you can tell me more so that I can solve this problem.

thanks again :upside_down_face:

You haven’t given much to go on except the image which looks like a web table. However, here are some methods for doing this that come to mind for working on tables.

  1. You filled in the first row, so I thought you might use the xpath of the first row and just increment the value within the xpath of the first row to get a xpath to the second row. We would need to see HTML or xpath of item1 on row1 to see if it would work. However, if the xpath to the first row item has something like “xxxxxx_0_xxxx”, then change the zero to a one, so the xpath to the second row becomes “xxxxxx_1_xxxx”.

  2. Another method is to make the xpath of the first row as an array of elements for other rows by putting parentheses around the xpath and incrementing the array index. To do that I give the example if the first row item xpath is //input[@id="champId"], then make the xpath to the second row like, (//input[@id="champId"])[1]. (Usually rows starts counting at zero so the one means the second row.) It doesn’t matter how long the xpath to the item is, just put a parenthesis around the very first character and a closing parenthesis around the very last character and then add the array index, like [1].

  3. If the element is a web table, another method you can try is to increment the reference of the first row item to indicate the second row. If the xpath to the first row item is like, .../tr[1]/td[1], then just increment the row index (that’s the tr in the xpath) so it becomes, ...tr[2]/td[1]

We don’t know which method above might work or if neither. We need more information of the HTML or the element’s xpath to better assist you. And others may have other ways of doing this.