Implicit Wait
and Explicit Waits
doesn't work that way, they will maximum wait for element for the time duration specified, If they find the element before that next step would be executed.
If you want your test to wait for exact time duration, you may want to use.
Thread.sleep(Time duration in milliseconds);
You may want to refer Diff b/w Implict Wait and Explicit Wait
Explicit Waits : An explicit waits is code you define to wait for a certain condition to occur before proceeding further in the code.
Implicit Waits : An implicit wait is to tell WebDriver to poll the DOM for a certain amount of time when trying to find an element or elements if they are not immediately available.
Thread.sleep : In sleep code It will always wait for mentioned seconds, even in case the page is ready to interact after 1 sec. So this can slow the tests.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…