• +91 9723535972
  • info@interviewmaterial.com

Selenium Interview Questions and Answers

Question - What is the difference between setSpeed() and sleep() methods?

Answer -

Both will delay the speed of execution.

Thread.sleep () :  It will stop the current (java) thread for the specified period of time.  Its done only once

  • It takes a single argument in integer format
Ex: thread.sleep(2000)- It will wait for 2 seconds

  • It waits only once at the command given at sleep
SetSpeed () :  For specific amount of time it will stop the execution for every selenium command.

  • It takes a single argument in integer format
Ex: selenium.setSpeed(“2000”)- It will wait for 2 seconds

  • Runs each command  after setSpeed delay by the number of milliseconds mentioned in set Speed
This command is useful for  demonstration purpose or if you are using a slow web application

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners