Skip to content
RED SAGSkills
medium10 pts · first answer countsseleniumflaky-tests

Replacing Thread.sleep in Selenium

A Selenium test uses Thread.sleep(8000) before clicking a button that loads slowly. What is the better approach?

driver.findElement(By.id("load")).click();
Thread.sleep(8000);
driver.findElement(By.id("pay")).click();
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions