Issue #2316739 by eshta: Refactored element selector and dialog functionality as reusable libraries.