Wednesday, 12 November 2014

Difference between Thread.Sleep() and Selenium.setSpeed()?

selenium.setSpeed
 
1.Syntax: selenium.setSpeed(string time in milliseconds);

 
ex: selenium.setSpeed("2000") - will wait for 2 seconds

 
2. Runs each command in after setSpeed delay by the 


number of milliseconds mentioned in setSpeed.
 
thread.sleep

 
1. Syntax:  thread.sleep(integer time in milliseconds);

 
ex: thread.sleep(2000) - will wait for 2 seconds

 
2. Waits for only once at the command given at sleep.

No comments:

Post a Comment