Xpath Function Using Index
Xpath Index:-
This approach comes in use when you wish to specify a given tag name in terms of index value you wish to locate too.
In the below example, the locator with ‘Full name’ as a field will be selected. The first input tag will be ignored whereas
the other tag will be considered owing to the index mentioned. This type of approach comes in handy when dealing with data in tables. For example, when you have multiple rows,
you can reference the desired row using an index.
Example 1: Xpath= //div[@class= 'col-sm-12 google-sign-form']/input[2]