'How to solve the error "Webdriver cannot be resolved to a type"?

enter image description here

To clear and run my code.

Webdriver cannot be resolved to a type



Solution 1:[1]

Please check and cross-verify the following to resolve the issue.

1: You might have unknowingly removed webdriver jars, try adding the webdriver(ChromeDriver) and selenium jars again. 2: Try using MAVEN and make sure while editing pom.xml you have provided the accurate scope and version of dependencies.

Hope this helps.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user10505256