Updated Version to identify if element is visible.