Xpath Function Using Child
Xpaths Child :-
As the name specified this approach is used when we intent to locate all child elements of the current node. A basic use case
of this approach could be when we wish to circulate through all the data in a table through the rows,
in this case we can find all the child of a particular table.
In the below-mentioned example, the first will locate all the input fields of the div for which are organization field, name field,
email field, password field and phone number field, where as the other is used to
locate element with the organization field only.
Example 1: Xpath= //div[@class='col-sm-12 google-sign-form']/child::input
Example 2: Xpath= //div[@class='col-sm-12 google-sign-form']/child::input[1]