<div>
    <dt>
        Test 1
    </dt>
    <dd>
    </dd>
    <dt>
        Test 2
    </dt>
    <dd>
    </dd>
</div>

I have this XPath written so far

//dt[contains(text(), "Test")]/self::dt|following-sibling::dd

But this is not bringing both dt and dd but just dt.

Edit
Report