1

When we give a wait of 15 seconds and the application response time is 20 seconds, selenium throws an errorr

Which is the exception that selenium throws?

3
  • Please, share your code here to get more details. Commented Jan 4, 2023 at 16:26
  • 1
    Please share the error you see Commented Jan 4, 2023 at 17:10
  • I just want to know this I did not get any error because this question asks to my friend in an interview. And tomorrow is my interview. Commented Jan 4, 2023 at 17:27

1 Answer 1

1

Selenium Web Driver Wait types:

  • Implicit Wait
  • Explicit Wait
  • Fluent Wait

The Implicit Wait in Selenium is used to tell the web driver to wait for a certain amount of time before it throws a No Such Element Exception. The default setting is 0. Once we set the time, the web driver will wait for the element for that time before throwing an exception.

The Explicit Wait in Selenium is used to tell the Web Driver to wait for certain conditions (Expected Conditions) or maximum time exceeded before throwing ElementNotVisibleException exception. It is an intelligent kind of wait, but it can be applied only for specified elements (it gives better options than implicit wait as it waits for dynamically loaded Ajax elements).

The Fluent Wait in Selenium is used to define the maximum amount of time to wait for a condition, as well as the frequency with which to check the condition. Users may configure the wait to ignore specific types of exceptions whilst waiting, such as NoSuchElementException when searching for an element on the page.

Documentation:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.