Unable to change perspective using SWTbot and Juno [message #962777] |
Mon, 29 October 2012 06:19  |
Eclipse User |
|
|
|
I have a huge set of test cases developed on Eclipse Indigo whose first constraint is to change the Eclipse perspective. Below is the code for the same.
SWTBotView view = bot.viewByTitle("Welcome");
if (view.isActive()) {
view.close();
}
// Change the perspective via the Open Perspective dialog
bot.menu("Window").menu("Open Perspective").menu("Other...").click();
SWTBotShell shell = bot.shell("Open Perspective");
shell.activate();
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.
Thanks in advance.
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04386 seconds