I am learning selenium by writing automation code for one web application. When a page get loaded , I am calling Thread.sleep() method and then setting an element ID.