Currently, I am working on writing an XPath expression for a specific section of code:
<div class="line info">
<div class="unit labelInfo TextMdB">First</div>
<div class="unit lastUnit">
<div class="line TextMd">Second</div>
I am trying to figure out how to select the second div tag by using the first div tag and the sibling concept. The XPath expression I have tried is:
//div[contains(text(), 'First')]/following-sibling::div[2][contains(text(),'Second')]
Unfortunately, this expression is not giving me the desired result. Can you help guide me on how to properly reach the "second" div tag using the "first" div tag? Your assistance would be greatly appreciated.