A simple test environment of selenium2.40+junit4.10 encounters: java.lang.NoClassDefFoundError

All the error messages are:
java.lang.NoClassDefFoundError: com/google/common/base/Charsets

After various searches, no solution was found, but I encountered a prompt, saying that this error is generally encountered, and it is not really impossible to find the operation. This class, or this class does not exist, is actually because the related information attached later cannot be found or the related jar is not loaded into the project.

I only added:
junit-4.10.jar
selenium-java-2.40.0.jar keeps

running Report the above error, after searching for this prompt, add:
selenium-server-standalone-2.40.0.jar

and run it again, everything is OK!

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326614450&siteId=291194637