1.

What Is The Difference Between Thread.sleep() And Selenium.setspeed()?

Answer»

selenium.setSpeed

takes a single argument in string format

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

Runs each command in after setSpeed DELAY by the NUMBER of milliseconds mentioned in setSpeed.

thread.sleep:

takes a single argument in integer format

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

Waits for only once at the command given at sleep.

selenium.setSpeed

takes a single argument in string format

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

Runs each command in after setSpeed delay by the number of milliseconds mentioned in setSpeed.

thread.sleep:

takes a single argument in integer format

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

Waits for only once at the command given at sleep.



Discussion

No Comment Found