Oleg Strokatyy
Oleg Strokatyy

Reputation: 641

Timeout between steps in selenium webdriver

Is it possible to set some timeout between steps as in QTP we have global option "Delay each step execution by"?

Upvotes: 2

Views: 2559

Answers (2)

Ozyman
Ozyman

Reputation: 513

You should instead use waitForElementPresent(). Selenium transforms this into a loop of Thread.sleep ultimately, but this is the best practice. The element being loaded depends on the test environment and as such is not coherent all the time. By using this method, you can forget about such worries

Upvotes: 2

Arian
Arian

Reputation: 3241

I know the Java code, look for something similar in C#:

Thread.sleep(1000); where 1000 is 1 sec.

Upvotes: 2

Related Questions