Simplify retry logic for ui helper functions
Improve code clarity and error messages for css selection
Merge pull request #995 from edx/zoldak/fix-acceptance

Simplify retry logic for ui helper functions