It's no surprise that this one pops up often in Infosys interview questions for experienced. Both slow down the execution pace.  Thread.sleep(): This function will pause the current (java) thread for the provided amount of time. It is only done once.  It accepts a single integer parameter.  For example, thread.sleep(3000) will wait 3 seconds.  It just waits once for the instruction issued during sleep.  SetSpeed(): Stops the execution of all Selenium commands for a specified length of time.  It accepts a single integer input = For example, selenium.setSpeed("3000") will wait for 3 seconds.  Each instruction is executed after setSpeed has been delayed by the amount of milliseconds specified in set Speed.  This command is handy for demonstrations or when using a sluggish online application.