Thread.sleep(1500) works where driver.manage().timeouts().implicitlyWait(2,TimeUnit.SECONDS) does not

36 views Asked by At

Many of the dropdowns on the webpage I'm working has the selections populated dynamically. When working with Selenium sometimes I need a wait moving from one element to the other.

I tried using driver.manage().timeouts().implicitlyWait(2,TimeUnit.SECONDS) but it doesn't seem to be working as I'd expect and often the elements still aren't found. I thought I'd try using Thread.sleep(1500) and it works every time. Does anyone have any idea why this is? I would think the wait would be the better of the two?

0

There are 0 answers