1.) You can take a look at how the SWTBot tests do this. This is how I did it:

    public void setUp()
    {
        Runnable runnable = new Runnable() {
            public void run() {
                new MySWTApplication().start();
            }
        };
        Thread t = new Thread(runnable);
        t.start();
    }

The "start" method contains the shell.open() which opens the SWT application.

2.) See http://swtbot.sourceforge.net/experimental/recorder.html

Don't expect that it works good enough. I discovered that I actually don't need 
the recorder. I has not much benefit I think even if it would work to its best 
potential.

I suggest to write classes which encapsulate the GUI actions on a high level 
like "logon(name, password)" and reuse them in your tests. Thats more 
productive I believe.


--- On Tue, 10/7/08, nawaz ahmed <[EMAIL PROTECTED]> wrote:
From: nawaz ahmed <[EMAIL PROTECTED]>
Subject: [SWTBot-users] Help required in SWTbot
To: swtbot-users@lists.sourceforge.net
Date: Tuesday, October 7, 2008, 2:08 AM

Hi,
   I have been working on this SWTBot past 15 days.
   I am able to write the script and automate few things in SWTbot like 
Starting the eclipse, Creating the   
   class in Eclipse, Creating the package in Eclipse, inserting the text in the 
textbox etc
 
   Now I have got another task to be completed i.e Start the SWT application 
and Automate the few   
   things in SWT application,
   
    1) How do I start this SWT application using SWTBot?
    2) How do you run the recorder in SWTbot? 
 
 Please help me in this regard and also let me know if there is any Tutorial 
available for SWTbot
 
NOTE: I am using Eclipse for wrinting scripts 
 
   
Thanks and Regards
 
 
 
  
-------------------------------------------------------------------------
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




      
-------------------------------------------------------------------------
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