Function to get all elements with text

Fixes #6