关于硒的新手问题

发布于 2024-11-09 16:26:34 字数 228 浏览 6 评论 0原文

我刚刚开始学习 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一花一树开 2024-11-16 16:26:34

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文