Search code examples
seleniumselenium-webdriverwebdriverwebdriverwait

Selenium Web driver wait for long time


Can I wait with Selenium Web Driver for a long time period?

Even though I can set implicitlywait command like below, it doesn't wait the time that I've given.

 driver.manage().timeouts().implicitlyWait(5, TimeUnit.MINUTES);

Is there anything wrong here?

In my case, I need to execute one test case and wait for 4 minutes and then execute the next test case.

I use Java here.


Solution

  • Actually this is not my answer, Two days ago I saw this answer here, But I had no time to apply it.Today I tried it and that's what exact I wanted.

    Unfortunately Now I can not see that answer here.So I added this answer and all credits should go to the user who posted this answer here.

    In this case what I wanted to do is to wait the driver for 5 mins so that until execute the periodical cron job.

    Thread.sleep(4000); to pause execution of program.