-
Notifications
You must be signed in to change notification settings - Fork 93
ClassNotFoundException
To quote from the Java documentation, the ClassNotFoundException is:
Thrown when an application tries to load in a class through its string name using:
- The
forNamemethod in classClass.- The
findSystemClassmethod in classClassLoader.- The
loadClassmethod in classClassLoader.but no definition for the class with the specified name could be found.
For clj-webdriver, forgetting to specify the Selenium-WebDriver JAR's in your project.clj is the most likely cause of encountering this exception. If Clojure can't find a class that either your or a library's code tries to import, this exception will be thrown.
Depending on which namespace(s) in clj-webdriver you use, you may see a different Selenium-WebDriver class as the missing culprit at runtime, but the source of the problem is missing JAR's. For most use-cases, including [org.seleniumhq.selenium/selenium-java "x.y.z"] as a dependency will solve your problem, but take a look at the rest of this Wiki and Selenium-WebDriver's documentation for more details.
The clj-webdriver Wiki by Daniel Gregoire and community is licensed under a Creative Commons Attribution 4.0 International License. Based on a work at https://github.com/semperos/clj-webdriver/wiki.
