Pregunta de entrevista de TPS

How the locators are created? How do you handle flaky tests?