'How to write following sibling CSS/Xpath expression of username field?

HTML Code:

<form autocomplete="on" xpath="1">
  <div class="IiD88i _351hSN">
     <input  class="_2IX_2- VJZDxU" autocomplete="off" type="text" value="">
     <span class="_36T8XR"></span>

I can write this one : //input[@type='text']

enter image description here

But how to write it in "following sibling" CSS/xpath of the above code?



Solution 1:[1]

If you want to fetch input node based on its sibling, try:

//label[.='Enter Email/Mobile number']/preceding-sibling::input

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 JaSON