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

Reply via email to