0

I have written a script using selenium where i have used implicit wait as

   driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);

initial time required to launch the build is around 10 second and later each page take 1 or 2 second. But when i run the script it is waiting for 10 sec for each page. SO overall process become time consuming as there are lots of page.NO try catch block is being used in script.

IS there any way where only initial wait can be given 10 seconds and for each page, find attribute takes 1 or 2 seconds.

Clad Clad
  • 2,653
  • 1
  • 20
  • 32

1 Answers1

0

You can have a boolean initially set to false. If false, wait for 10 sec. After initial wait, set it to true.

Sajal Dutta
  • 18,272
  • 11
  • 52
  • 74