0

This was one of the interview questions.

If the Implicit wait is say say 20 seconds and the explicit wait is say 10 seconds for a webelement say loc1

What will happen say if the weblement is not locatable in the first 20 seconds for which there is explicit wait of 10 seconds, a)will it first wait for 20 seconds as that is the value of implicit wait and then again wait for 10 more seconds before throwing an error element not found or? b) will it throw an error in the first 20 seconds of implicit wait only if it is not able to find the element? c) Is it ok to use both Implicit wait and explicit wait together ,, are there any problems in combining them both.

  • 1
    So, what is your problem? What have YOU tried and what actual results have YOU received? – Prophet Jul 29 '21 at 09:44
  • if you use both you'll have two competing polling loops. (polling occurs every 1/2 second) This can and will cause conflicts. Not sure the behavior will be predictable. – pcalkins Jul 29 '21 at 18:45

1 Answers1

1

Its not a good practice to use both. You can once refer this.

http://makeseleniumeasy.com/2017/07/02/part-6-waits-in-selenium-what-happens-when-we-mix-implicit-wait-and-explicit-wait/

pmadhu
  • 3,373
  • 2
  • 11
  • 23