Selenium Java, how can I attach wait.until to the html attributes. or use other functions

When I automated my web page. I’m only use Thread.sleep(4000or2000or1000) and my tests continued 2 or 3 hours. I know that it’s bad thing))). and I know I can use wait.until. But in my web page hasn’t any pictures which of I can be attach wait.until. Can you help me with this problem.

What are you waiting until for exactly?

The page to be rendered at all? Text to appear? You said you don’t have images, but the web page must have something that you are waiting on loading?