Thanks Ketan,
If SWTBot is not throwing a WidgetNotFoundException when a view is not
open, there's probably a bug.
I agree with this, but the view is already "open" it is just not visible :
just after launching the application the two views are in the same
folder : the first is visible (on top) but the second is hidden.
"As a human being", when I just click on the tab of the second view, the
RCP framework "automatically" calls createViewPart and the view is shown.
to reproduce this behavior with SwtBot I need to :
1°/ Manually create the view
2°/ Call SWTEclipseBot.view to select the view
I'm not sure if this manual creation is really the right thing, because
it creates a different behavior between my "real" application and my
test application :
what I'm afraid of is :
if I manually force the creation of the view (in my test case), a
behavior which needs this view (initialised) will work fine.
But in the real application if I don't clic on the view, it will not be
initialised and the same behavior will not work.
Ketan Padegaonkar a écrit :
SWTBot works in a way which is similar to what a human being does. If
you search for a view which is not open SWTBot throws a
WidgetNotFoundException, which is a right failure, since the view is
not really open, although it exists.
If SWTBot is not throwing a WidgetNotFoundException when a view is not
open, there's probably a bug.
So what you're doing is the right thing, activate the view in whatever
way you find convinient -- invoke API directly or click through the
menus.
Cheers,
Ketan Padegaonkar
I blog... therefore I am... http://ketan.padegaonkar.name
http://swtbot.org/ - a functional testing tool for SWT/Eclipse
On 6/10/08, Guillaume Bourel <[EMAIL PROTECTED]> wrote:
I tried to use SWTEclipseBot.view(String label) to select a view which
has been created at launch time but was never made visible (my
perspective contains two views within the same folder).
But if I just load the view (with IWorkbenchPage.showView("myViewID",
null, IWorkbenchPage.VIEW_CREATE); ) before calling
SWTEclipseBot.view(String label) everything works fine.
Maybe this check could be done in
SWTBotView.findWidget(IWorkbenchPartReference view, Finder finder)
when ((WorkbenchPartReference) view).getPane().getControl() returns a
null control.
Or does this null return value means something else ?
Cheers,
Guillaume.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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