Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsNew SWTBot release
https://www.eclipse.org/forums/index.php/mv/msg/11616/36074/#msg_36074
This is in continuation of my previous email[1] on some of the new
features in swtbot.
I've pushed in a new build of SWTBot in case you wish to try it out. If
you're going to be downloading this release, I'd highly recommend
reading these notes.
Some known issues:
1. Editor autocompletes and quickfixes is broken with eclipse 3.5M7 and RC1.
2. Menus inside eclipse are broken with eclipse 3.5M7 and RC1.
Some of the features:
1. Toggle button support
2. SWTBot can now be scoped to search within a particular widget:
This makes the earlier nuiances redundant:
widget = bot.viewByLabel("Package Explorer").getWidget();
SWTBotTree t = bot.widget(widget, widgetOfType(Tree.class));
3. Renamed SWTEclipseBot to SWTWorkbenchBot:
SWTEclipseBot is available but deprecated. Also the methods
view(viewLabel) and editor(fileName) are renamed to
viewByLabel(viewLabel) and editorByFileName(fileName);
4. Native mouse support (partial):
Clicking on certain widgets actually moves the mouse over them and
performs the click.
5. Native keyboard event(needs community inputs):
Performing type operations performs keyboard types using native events.
This requires that the community participates in sending in their
keyboard layouts[2] for inclusion in SWTBot.
6. Setting preferences is now easier.
Setting preferences is now a matter of setting a simple variable instead
of via System.setProperty().
-- Ketan]]>Ketan Padegaonkar2009-05-21T05:03:09-00:00Re: New SWTBot release
https://www.eclipse.org/forums/index.php/mv/msg/11616/36109/#msg_36109
I just upgraded to 2.0.0.292, running Eclipse 3.4.1 on MacOSX10.5,
following your comment on bug
Unfortunately none of my now tests run properly. I've changed all bot
references to SWTWorkbenchBot, and the way I access views, but the
detection of dialogs seems not to work anymore.
ALl my tests start by creating a fresh project via the new project wizard
:
public static void getNewProjectWizardMainPage(SWTWorkbenchBot bot) throws
Exception{
// this still works and opens new project wizard
bot.menu("File").menu("New").menu("SBSI System").click();
// this was workng but now fails with timeout exception
bot.shell(NewSBSIProjectWizard.WINDOW_TITLE).activate();
}
The 'New Project' Dialog opens ok but the test fails with a 'widget not
found' exception as the open shell cannot be found - the test just hangs
and the dialog is not completed. I tried adding text by hand but his
rather loses the convenience of automated tests.
I read your two recent posts and can't see anything about this being
changed.
- Also, 'viewByLabel' is not present in API, but bot.viewByTitle is - are
they the same thing?
Thanks
Richard]]>Richard Adams2009-05-21T10:03:15-00:00Re: New SWTBot release
https://www.eclipse.org/forums/index.php/mv/msg/11616/36143/#msg_36143
> Some of the features:
> 1. Toggle button support
> 2. SWTBot can now be scoped to search within a particular widget:
> This makes the earlier nuiances redundant:
> widget = bot.viewByLabel("Package Explorer").getWidget();
> SWTBotTree t = bot.widget(widget, widgetOfType(Tree.class));
Cool!
Glad to see new stuff happening :)]]>Derek 2009-05-21T22:08:56-00:00Re: New SWTBot release
https://www.eclipse.org/forums/index.php/mv/msg/11616/36372/#msg_36372
Richard Adams wrote:
> Hi Ketan,
> I just upgraded to 2.0.0.292, running Eclipse 3.4.1 on MacOSX10.5,
> following your comment on bug
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=275127.
> Unfortunately none of my now tests run properly. I've changed all bot
> references to SWTWorkbenchBot, and the way I access views, but the
> detection of dialogs seems not to work anymore.
I got the same problem with 2.0.0.316.
I found out that there is a differnce between 2.0.0.316 and 2.0.0.204,
when starting a test as "SWTBot Test" from within Eclipse.
With 204 the command line contains
-application org.eclipse.swtbot.eclipse.core.swtbottestapplication
With 316 the command line contains
-application org.eclipse.pde.junit.runtime.uitestapplication
So it seems the "SWTBot Test" of 316 starts a PDE JUnit test.
As a workaround I just added the good argument to my runtime
configuration's arguments.
Kind Regards,
Stefan]]>Stefan Seelmann2009-05-23T21:34:11-00:00Re: New SWTBot release
https://www.eclipse.org/forums/index.php/mv/msg/11616/36399/#msg_36399
> I found out that there is a differnce between 2.0.0.316 and 2.0.0.204,
> when starting a test as "SWTBot Test" from within Eclipse.
I just ran a few tests myself, and the command line as returned by "ps
aux | grep java" contains
org.eclipse.swtbot.eclipse.core.swtbottestapplication and not pde's
uitestapplication as you mention.
-- Ketan]]>Ketan Padegaonkar2009-05-24T05:10:04-00:00Re: New SWTBot release
https://www.eclipse.org/forums/index.php/mv/msg/11616/36462/#msg_36462
Could you try deleting the launch configuration and execute the test
again ? I have a suspicion that this was possibly introduced[1] as part
of bug 274083[2]. Although nothing points me in this direction.
On 24/5/09 10:40, Ketan Padegaonkar wrote:
> On 24/5/09 03:04, Stefan Seelmann wrote:
>> I found out that there is a differnce between 2.0.0.316 and 2.0.0.204,
>> when starting a test as "SWTBot Test" from within Eclipse.
>
> I just ran a few tests myself, and the command line as returned by "ps
> aux | grep java" contains
> org.eclipse.swtbot.eclipse.core.swtbottestapplication and not pde's
> uitestapplication as you mention.
>
> -- Ketan]]>Ketan Padegaonkar2009-05-24T06:30:56-00:00Re: New SWTBot release
https://www.eclipse.org/forums/index.php/mv/msg/11616/36479/#msg_36479
> Could you try deleting the launch configuration and execute the test
> again ? I have a suspicion that this was possibly introduced[1] as part
> of bug 274083[2]. Although nothing points me in this direction.
Still the same.
I tried some more:
- Installed a fresh Eclipse Ganymede 3.4.2
- Started with a fresh workspace
- Installed SWTBot 2.0.0.316 from update site [1]
- Created a test plugin with the following class:
-----------------------------------------------------
@RunWith(SWTBotJunit4ClassRunner.class)
public class MyFirstTest extends SWTBotEclipseTestCase {
@Test
public void OpenPerspective() throws Exception {
final SWTWorkbenchBot bot = new SWTWorkbenchBot();
bot.menu("Window").
menu("Open Perspective").
menu("Other...").click();
bot.shell("Open Perspective"); // <--hangs here
bot.table().select("Resource");
bot.button("OK").click();
}
}
-----------------------------------------------------
- Right-click the class and select Run As->SWTBot Test
--> The "Open Perspective" dialog is opened but hangs then.
I found another workaround:
In the run configuration's main tab, the selection is "Run a product"
and "org.eclipse.platform.ide". If I change this to "Run an application"
and "org.eclipse.swtbot.eclipse.core.swtbottestapplication" everything
works well.
I'll try with Eclipse 3.5 later, because I need JUnit 4.5.
Kind Regards,
Stefan
[1] http://download.eclipse.org/technology/swtbot/ganymede/dev-b uild/update-site]]>Stefan Seelmann2009-05-24T08:28:37-00:00Re: New SWTBot release
https://www.eclipse.org/forums/index.php/mv/msg/11616/36509/#msg_36509
I think that is enough info. The only difference between galileo and
ganymede is the junit4 dependency. The code is the same.
Thanks!
-- Ketan
On 24/5/09 13:58, Stefan Seelmann wrote:
> Hi Ketan,
>> Could you try deleting the launch configuration and execute the test
>> again ? I have a suspicion that this was possibly introduced[1] as part
>> of bug 274083[2]. Although nothing points me in this direction.
>
> Still the same.
>
> I tried some more:
> - Installed a fresh Eclipse Ganymede 3.4.2
> - Started with a fresh workspace
> - Installed SWTBot 2.0.0.316 from update site [1]
> - Created a test plugin with the following class:
> -----------------------------------------------------
> @RunWith(SWTBotJunit4ClassRunner.class)
> public class MyFirstTest extends SWTBotEclipseTestCase {
> @Test
> public void OpenPerspective() throws Exception {
> final SWTWorkbenchBot bot = new SWTWorkbenchBot();
> bot.menu("Window").
> menu("Open Perspective").
> menu("Other...").click();
> bot.shell("Open Perspective"); //<--hangs here
> bot.table().select("Resource");
> bot.button("OK").click();
> }
> }
> -----------------------------------------------------
> - Right-click the class and select Run As->SWTBot Test
> --> The "Open Perspective" dialog is opened but hangs then.
>
> I found another workaround:
> In the run configuration's main tab, the selection is "Run a product"
> and "org.eclipse.platform.ide". If I change this to "Run an application"
> and "org.eclipse.swtbot.eclipse.core.swtbottestapplication" everything
> works well.
>
> I'll try with Eclipse 3.5 later, because I need JUnit 4.5.
>
> Kind Regards,
> Stefan
>
>
> [1]
> http://download.eclipse.org/technology/swtbot/ganymede/dev-b uild/update-site]]>Ketan Padegaonkar2009-05-24T11:52:30-00:00Re: New SWTBot release
https://www.eclipse.org/forums/index.php/mv/msg/11616/36790/#msg_36790
I've fixed this issue with the latest build on the update site.
Could you test if that works fine ?
-- Ketan
On 24/5/09 17:22, Ketan Padegaonkar wrote:
> Thanks,
>
> I think that is enough info. The only difference between galileo and
> ganymede is the junit4 dependency. The code is the same.
>
> Thanks!
>
> -- Ketan
>
> On 24/5/09 13:58, Stefan Seelmann wrote:
>> Hi Ketan,
>>> Could you try deleting the launch configuration and execute the test
>>> again ? I have a suspicion that this was possibly introduced[1] as part
>>> of bug 274083[2]. Although nothing points me in this direction.
>>
>> Still the same.
>>
>> I tried some more:
>> - Installed a fresh Eclipse Ganymede 3.4.2
>> - Started with a fresh workspace
>> - Installed SWTBot 2.0.0.316 from update site [1]
>> - Created a test plugin with the following class:
>> -----------------------------------------------------
>> @RunWith(SWTBotJunit4ClassRunner.class)
>> public class MyFirstTest extends SWTBotEclipseTestCase {
>> @Test
>> public void OpenPerspective() throws Exception {
>> final SWTWorkbenchBot bot = new SWTWorkbenchBot();
>> bot.menu("Window").
>> menu("Open Perspective").
>> menu("Other...").click();
>> bot.shell("Open Perspective"); //<--hangs here
>> bot.table().select("Resource");
>> bot.button("OK").click();
>> }
>> }
>> -----------------------------------------------------
>> - Right-click the class and select Run As->SWTBot Test
>> --> The "Open Perspective" dialog is opened but hangs then.
>>
>> I found another workaround:
>> In the run configuration's main tab, the selection is "Run a product"
>> and "org.eclipse.platform.ide". If I change this to "Run an application"
>> and "org.eclipse.swtbot.eclipse.core.swtbottestapplication" everything
>> works well.
>>
>> I'll try with Eclipse 3.5 later, because I need JUnit 4.5.
>>
>> Kind Regards,
>> Stefan
>>
>>
>> [1]
>> http://download.eclipse.org/technology/swtbot/ganymede/dev-b uild/update-site
>>
>]]>Ketan Padegaonkar2009-05-25T10:14:30-00:00Re: New SWTBot release
https://www.eclipse.org/forums/index.php/mv/msg/11616/36824/#msg_36824
Many thanks Ketan!
Ketan Padegaonkar wrote:
> Hi Stefan,
>
> I've fixed this issue with the latest build on the update site.
>
> Could you test if that works fine ?
>]]>Stefan Seelmann2009-05-25T21:19:03-00:00Re: New SWTBot release
https://www.eclipse.org/forums/index.php/mv/msg/11616/36927/#msg_36927
thanks very much,
Richard]]>Richard Adams2009-05-26T13:42:59-00:00