refactored method to make global click_on_text method