Answers

Question and Answer:

  Home  Automation

⟩ Explain me what is the difference between setSpeed() and sleep() methods?

Both of these methods delay the speed of execution. The main difference between them is setSpeed sets a speed while will apply delay time before every Selenium operation takes place. thread.sleep() will set up wait only for once.

For Example:

☛ sleep(5000)- It will wait for 5 seconds. It is executed only once, where the command is written.

☛ setSpeed("5000")- It also will wait for 5 seconds. It runs each command after setSpeed delay by the number of milliseconds mentioned in set Speed.

 156 views

More Questions for you: