If it should be a single XPath 1.0 expression, you will have to say
//dt[contains(., 'Test')] | //dt[contains(., 'Test')]/following-sibling::dd[1]
The final [1] important, since without it it extracts all dd elements that follow the dt containing "Test", ie Considering
<div> <dt> Test 1 </dt> <dd> Foo </dd> <dt> Something else 2 </dt> <dd> Bar </dd> </div>
the version without [1] will correspond to three nodes, dt containing "Test 1", and the elements "Foo" and "Bar" dd . With the help of [1] you correctly get only "Test 1" and "Foo".
But depending on how you use XPath, it may be clearer to choose
//dt[contains(., 'Test')]
and then iterate over the nodes that this matches, and evaluate
. | following-sibling::dd[1]
in the context of each of these nodes in turn.
source share