According to selenium, an implicit wait polls the DOM for a certain amount of time to see if an element shows up. My understanding is that it will poll up to a specified amount of time, but if an element shows up before, then it will continue without waiting further.
http://seleniumhq.org/docs/04_webdriver_advanced.html
I have a method that runs in about 13 seconds. When I set the implicit wait to 100 seconds, it takes 213 seconds.
driver.manage().timeouts().implicitlyWait(100, TimeUnit.SECONDS);
It appears that during this method, I'm waiting 2 times (100 seconds each). Setting the implicit wait to 0 or 100 doesn't affect my method. In both cases, they finish correctly.
My question is this. I thought the implicit wait waits for the shortest amount of time for an element to show up. Is this right? Or am I doing something wrong?
Furthermore, why is it waiting 2 times, when it apparently does not need to wait? (My method finishes correctly even if I set the wait to 0)