Hi Guys,

   i have been creating a New Java Project in Eclipse[not a plug -in project
as before]{3.4-ganymede}

   & inserting the Following to Files

 1.GUI.java   which Contains
   

      A shell named  "Hello world" with a Text Field and a Button 
named("Submit").

 2.GUI_Test.java  which contains

     public void testXxx()  throws Exception{

              bot.getDisplay().syncExec(new Runnable(){

                                @Override
           public void run() {
                        // TODO Auto-generated method stub
                        try{
                        Shell[] shell=bot.getDisplay().getShells();
                        System.out.println("c2");
                        for(int i=0;i<shell.length;i++)
                        System.out.println("Print"+shell[i]);
                        }catch(Throwable r){System.out.println 
("Fail::"+r.getMessage());}
                                }});

                       /*works fine till here*/

                                
                        //this is where the code throws an Error
                        bot.shell("Hello world").activate();


       }


   i have the neccesary jar files in the Build path......


i am able to print the active shell using my code i.e i get "Hello world" on
the console


but after that i get a error <Errors:-:org/eclipse/core/runtime/Assert>



what is the Problem here?????



p.s: the complete console output looks like this:->

PrintShell {Hello world}
java.lang.NoClassDefFoundError: org/eclipse/core/runtime/Assert
        at net.sf.swtbot.SWTBot.waitUntil(SWTBot.java:654)
        at net.sf.swtbot.SWTBot.waitUntil(SWTBot.java:641)
        at net.sf.swtbot.SWTBot.waitUntil(SWTBot.java:614)
        at net.sf.swtbot.widgets.AbstractSWTBot.<init>(AbstractSWTBot.java:119)
        at net.sf.swtbot.widgets.AbstractSWTBot.<init>(AbstractSWTBot.java:98)
        at net.sf.swtbot.widgets.SWTBotShell.<init>(SWTBotShell.java:42)
        at net.sf.swtbot.SWTBot.shell(SWTBot.java:143)
        at GUI_Test.testClicksOnAButton(GUI_Test.java:59)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at junit.framework.TestCase.runTest(TestCase.java:164)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        at net.sf.swtbot.SWTBotTestCase.runBare(SWTBotTestCase.java:234)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:230)
        at junit.framework.TestSuite.run(TestSuite.java:225)
        at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
        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)
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.Assert
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        ... 27 more


-- 
View this message in context: 
http://www.nabble.com/Kindly-Point-out-the-Mistakes-in-The--SWTBot-Snippet-tp19876230p19876230.html
Sent from the SWTBot Users List mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
SWTBot-users mailing list
SWTBot-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse

Reply via email to