I am writing XPath for the following piece of code:
<div class="line info">
<div class="unit labelInfo TextMdB">First</div>
<div class="unit lastUnit">
<div class="line TextMd">Second</div>
How can I reach the second div tag by using the first div tag using the sibling concept? I wrote my XPath like:
//div[contains(text(), 'First')]/following-sibling::div[2][contains(text(),'Second')]
But it's not working. How do I reach the "second" by using the "first" div tag? I appreciate your help.