Skip to content
Advertisement

The constructor WebDriverWait(chromeDriver, int) is undefined [closed]

WebDriverWait is not recognized even though it is imported in the eclipse IDE.

enter image description here

Does anyone know the possible reason and fix for this?

Advertisement

Answer

You are trying to use

JavaScript

which will call this constructor

JavaScript

As you can see, it has been deprecated in newer version of Selenium i.e Selenium 4

Solution:

You should rather use this constructor:

JavaScript

Your effective code:

JavaScript

should get the job done for you.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement