However the test case when running on Eclipse Juno (4.2) fails with the following error:

org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException: Could not find widget.
at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntilWidgetAppears(SWTBotFactory.java:348)
at org.eclipse.swtbot.swt.finder.SWTBotFactory.menu(SWTBotFactory.java:257)
at org.eclipse.swtbot.swt.finder.SWTBotFactory.menu(SWTBotFactory.java:208)
at org.eclipse.swtbot.swt.finder.SWTBotFactory.menu(SWTBotFactory.java:198)
at ... 41 more

The exact line is while it is trying to access the menu. Do let me know if there is any change i need to make, to make the test case work for Juno.

How about this: you use the perspective ID? E.g. for opening resource perspective you try :
bot.perspectiveById("org.eclipse.ui.resourcePerspective").activate();
Or a bit nicer:
SWTBotPerspective botPerspective = bot
.perspectiveById("org.eclipse.ui.resourcePerspective");
assertNotNull(botPerspective);
botPerspective.activate();

On 10/29/2012 11:19 AM, Anitha Mising name wrote:
> The exact line is while it is trying to access the menu. Do let me know
> if there is any change i need to make, to make the test case work for Juno.

Which menu?
Is this menu actually here? Eclipse 4.2 has some refactoring in the
Welcome menu IIRC, so maybe you're simply missing the plugin responsible
of displaying it.

> On 10/29/2012 11:19 AM, Anitha Mising name wrote:
>> The exact line is while it is trying to access the menu. Do let me know
>> if there is any change i need to make, to make the test case work for Juno.

> Which menu?
It's the basic Windows menu that is used to access perspectives as in the case of code below. This menu comes with Eclipse Juno 4.2.
bot.menu("Window")

> Is this menu actually here? Eclipse 4.2 has some refactoring in the
> Welcome menu IIRC, so maybe you're simply missing the plugin responsible
> of displaying it.
All the plugins are available.

> Do you use Linux? Do you have a working window manager on the DISPLAY
> you're using? I saw some issues like this one before because of usage of
> twm or other bad window managers...

No, i am Windows user. Also i found hitting this issue again when i tried to create some projects and build using 'Build All' option. I am unable to access the menu 'Project'.
bot.menu("Project").menu("Build All").click();
Even this throws the same WidgetNotFoundException.