title: How to go back to the immediate parent in XPath and get the text?
body: <p>My <code>xpath</code> is  </p>
  
  <pre><code>//div[contains(@class,'ui-dialog ui-widget ui-widget-content ui-corner-all ui-front ui-draggable')]//div[@class='ui-widget-content slick-row odd' or @class='ui-widget-content slick-row even']/div/input[contains(@id,'custProglabel')]
  </code></pre>
  
  <p>I need to access <code>div</code> just before <code>input</code> tag and get its text. I tried using:</p>
  
  <pre><code>By.Xpath(//input[contains(@id,'custProglabel')]/preceding-sibling::div).getText();
  </code></pre>
  
  <p>I have many elements like this and only the content of my input tag changes. So based on the content I am trying to access the immediate div and get its text.</p>