DRY getDomElements in utils