Testing SWT Buttons

sputnick
2008-05-14
2013-05-20
  • sputnick

    sputnick - 2008-05-14

    Hi,

    I'm trying to test a Wizard. For this reason I use Abbot to click on the next button and go to the next wizard page. I have the following code:

    ...
    display.syncExec(new Runnable() {

             public void run() {
                ...
                Button next =
                      (Button) WidgetFinderImpl.getDefault().find(dialog.buttonBar,
                                                                  new WidgetTextMatcher(IDialogConstants.NEXT_LABEL, Button.class));
               ButtonTester.getButtonTester().actionClick(next);
               assertTrue(dialog.getCurrentPage() instanceof AbstractImportWizardLoadPage);
               ...
            }
    }

    With this code I get an "invalid thread" exception at the point ButtonTester.getButtonTester().actionClick(next)
    Can anyone provide an example how the ButtonTester should be used? Thanks.

    Nick

     
    • rainaV

      rainaV - 2008-10-06

      Hi sputnick,

          I am new to Testing ,Abbot tool and would need your help
          I just wanted to Know if this tool can be used for testing Stand
          alone   SWT UI Applications.

        Cause the Package i downloaded has a Costello.jar file when i run it it askes for a Launch File and so on....

      but the Default view is Swings

      Kindly reply Soon

      Thanx in advance 

      Kindly mail your reply at  <veneet.raina@techblue.co.uk>

      B bye!

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks