关于硒的新手问题
我刚刚开始学习 Selenium,想尝试一个简单的例子。
但是,当我运行代码时,出现以下异常:
Exception in thread "main" java.lang.NoClassDefFoundError: com/gargoylesoftware/htmlunit/WebWindowListener
有谁知道如何缓解此问题?
谢谢。
I just started learning Selenium, and would like to try a simple example.
However, I get the following exception when I run the code:
Exception in thread "main" java.lang.NoClassDefFoundError: com/gargoylesoftware/htmlunit/WebWindowListener
Does anyone know how to mitigate this?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
NewbieIntern 自己解决了这个问题,但是,我会给出这个答案,以便 Google 上的人们感到高兴。
您必须包含 selenium 服务器 jar,或者用 NewbieIntern 的话说,“selenium-server-standalone-2.0a5.jar”。这个版本号可能会改变。
NewbieIntern solved this issue himself, but, I'll put in this answer so people on Google are happy.
You have to include the selenium server jar or, in NewbieIntern's words, "selenium-server-standalone-2.0a5.jar". This version number will probably change.