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

Answers

: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   Your Comment




More Software,Java Questions..
What is the inputsplit in map reduce software?

Can variables be used in Java without initialization?

What is the difference between java bean and enterprise java bean?

What is software configuration management?

How does the java database connectivity (jdbc) work?

What are the advantages of threads in java?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

What is object cloning in Java?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?



Search
Can you Answer!!
  • Q Name the India’s representative who witnessed the ceremony of the birth of the new nation of South Sudan?
  • Q What airline postponed adverts claiming to '...go the extra mile to make you feel special...' after a photo of (allegedly) a pilot and crew member having sex in an aircraft cockpit became public in Aug 2011?
  • Q Write a program to print four digit positive integer number in reverse order.
  • Q How to validate data?
  • Q What are the family and order of Golden loach ?
  • Q What is token in C?
  • Q Which of the following Indian banks became the first to touch a market capitalization of `1,00,000 crore in India?
  • Q What is horizontal portals?
  • Q What happens when a transaction fails on the publisher?
  • Q In which state of India the Baglihar project is constructed?
  • Q What is the relationship between Job and Task in Hadoop?