refactor clickElement() to fix #110