<div>
<input>
<label id="Star">
<input>
<label id="Moon">
<input>
<label id="Sun">
</div>
Query:
driver.findElement(By.xpath("//label(@id='star')/parent::div/input`).
I am getting the 3 matching nodes but I need to find the <label id="Star"> of <input>.