Selenium Question:
Explain what is the difference between Thread.Sleep() and Selenium.setSpeed()?
Answer:
Selenium.setSpeed:
1. takes a single argument in string format
ex: selenium.setSpeed("2000") - will wait for 2 seconds
2. Runs each command in after setSpeed delay by the number of
milliseconds mentioned in setSpeed.
Thread.sleep:
1. takes a single argument in integer format
ex: thread.sleep(2000) - will wait for 2 seconds
2. Waits for only once at the command given at sleep.
1. takes a single argument in string format
ex: selenium.setSpeed("2000") - will wait for 2 seconds
2. Runs each command in after setSpeed delay by the number of
milliseconds mentioned in setSpeed.
Thread.sleep:
1. takes a single argument in integer format
ex: thread.sleep(2000) - will wait for 2 seconds
2. Waits for only once at the command given at sleep.
Previous Question | Next Question |
Tell me what are the basic annotations used to run TestNG tests in Selenium? | Explain how to configure Selenium RC with eclipse to run Junit Tests? |