Automation Question:
Explain me what is the difference between setSpeed() and sleep() methods?
Answer:
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.
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.
Previous Question | Next Question |
Do you know what is the difference between "type" and "typeAndWait" command? | Tell me could cookies be deleted in Selenium? |