Eclipse中的Selenium缺少源代码

Pro*_*tak 3 java eclipse selenium selenium-rc

请参阅随附的屏幕截图.

当我将鼠标悬停在以下代码上时:

selenium.waitForPageToLoad("30000");
Run Code Online (Sandbox Code Playgroud)

我收到这条消息:

*void com.thoughtworks.selenium.Selenium.waitForPageToLoad(String arg0)

注意:此元素既没有附加源也没有附加Javadoc,因此找不到Javadoc.*

F3正在给我" 未找到来源 ".

有谁知道从哪里获取这个源(它叫什么)以及如何附加到Eclipse? TTP://img853.imageshack.us/img853/8248/ecl.png

Dav*_*unt 6

通过从项目的下载页面下载selenium-java-2.x.zip文件,可以获得srcs jar.例如,当前版本(2.0b3)可在此处获取:http://code.google.com/p/selenium/downloads/detail? name = selenium-java-2.0b3.zip

然后,您应该能够将其作为selenium-java-2.x.jar引用库的源.

  • 谢谢你.但我需要确切的步骤如何添加srcs.MeBigFatGuy给了我答案.但你给了正确的链接,这也是有帮助的:) (2认同)

MeB*_*Guy 6

你可以在这里通过svn获取源代码:

http://code.google.com/p/selenium/source/checkout

下载后,

在eclipse中,在"引用的库"中找到jar,右键单击 - > properties

在"Java源附件"编辑框中输入src的位置.