How do you handle dynamic web elements in Selenium that change their IDs or attributes upon page refresh?