title: How t form complex xpath?
body: <p>I am new to selenium and trying to form complex xpath for my project. I have tried and already verified multiple solutions but none of them are working correctly. Kindly have a look and let me know your valuable feedback </p>
  
  <p>Tried solutions</p>
  
  <pre><code>1. //div[@id='agree']//following-sibling::br
  2. //div[@id='agree']
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;div id="agree"&gt;
  &lt;label class="Control-label"&gt;Privacy Policy and Terms of Conditions&lt;/label&gt;
  &lt;br style xpath="1"&gt;
  Your personal information provided to us will be used
  &lt;a href="/privacy/statment" title="privacy policy"&gt;privacy policy&lt;/a&gt;
  "."
  &lt;br style xpath="2"&gt;
  &lt;br style xpath="3"&gt;
  &lt;a href="terms condition" title="terms condition"&gt;terms condition&lt;/a&gt;
  &lt;br style xpath="4"&gt;
  &lt;br style xpath="5"&gt;
  &lt;a href="terms condition" title="terms condition"&gt;terms condition&lt;/a&gt;
  </code></pre>
  
  <p>Expected solution: </p>
  
  <pre><code>Your personal information provided to us will be used privacy policy.
  </code></pre>