Wait until an element is visible
Automation taskMediumAsked in: Accenture, BrowserStack, Capgemini, Cognizant, Infosys, TCS, Wipro
Interviewers ask: "A message appears a few seconds after the page loads. How do you read it reliably?" The answer is an explicit wait for visibility (a wait for one condition, set up in your test code), never a fixed sleep. The wait checks the page again and again and returns as soon as the message shows.