开发者

Source not found: The jar file selenium-java-client-driver.jar has no source attachment

I am creating test cases using Junit framework and eclipse. Once I complete my execution of script I am getting below error:

It also gives me the option to attach the source.

    java.lang.NullPointerException
    at com.thoughtworks.selenium.SeleneseTestCase.tearDown(SeleneseTestCase.java:395)
    at junit.framework.TestCase.runBare(TestCase.java:140)
    at com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:71)
    at junit.framework.TestResult$1.protect(TestResult.java:110)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at junit.framework.TestResult.run(TestResult.java:113)
    at junit.framework.TestCase.run(TestCase.java:124)
    at junit.framework.TestSuite.runTest(TestSuite.java:232)
    at junit.framework.TestSuite.run(TestSuite.java:227)
    at org.junit.internal.runners.JUnit38ClassRunner.run(J开发者_高级运维Unit38ClassRunner.java:83)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Please please please help me.

Saara


Saara,

It seems you are describing two separate problems.

Firstly, your NPE (NullPointerException) which is being thrown by the SeleneseTestCase.java on line 395 is causing your test to fail. You have not supplied enough information to determine the cause for this exception, but it's likely to be your configuration of the software. You might want to at least include the version numbers of the client libraries you are using.

The second problem is that you are trying to browse into the source of a client library (selenium-java-client-driver.jar) which has no source attachment. I'll assume you're using eclipse (something else you should mention: the ide you are using) in which case, you can attach an archive, folder or url pointing to the source code for a client library and eclipse will be able to browse to the offending line (SeleneseTestCase.java line 395). Doing this might help you determine what is causing the exception to be thrown.

Really though, you haven't included enough information to receive any more help than that.


Have you set the build path for the eclipse project? i.e. linked the selenium server to the project.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜