I am automating one application using selenium in which I am stuck at a point where I am not able to find the way to locate an element for same fields which are in different blocks but their xpaths and all other entities are same hence I am unable to locate element for fields of the second block.
There are 2 blocks which are having same fields (Street text field, State drop down, city text field an zip text field). I have done the code for the first block using XPath and it is working fine.
But the problem is with the second block where all the fields are the same and their xpaths are also same. When I execute the script what is happening is, data entered in the first block is done correctly, but for the second block, as the xpaths are same the control is going back to the first block and start entering data in already filled fields. Nothing is there for differentiating so I can not locate the elements for the second block.