tests/webrtc: add helper for getting the offer/answer element