Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Can't access Console view?
Can't access Console view? [message #507877] Thu, 14 January 2010 18:26 Go to next message
Robert M. Fuhrer is currently offline Robert M. Fuhrer
Messages: 294
Registered: July 2009
Senior Member
The following always fails with a WidgetNotFoundException:

SWTBotView consoleView= bot.viewByTitle("Console");

even when I can see that the Console view is visible when this
query executes.

Is this the wrong way of getting at the Console?

--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
Re: Can't access Console view? [message #507885 is a reply to message #507877] Thu, 14 January 2010 19:46 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
Seems to work for me. Do you have a stack trace to help diagnose ?

Here's my test. I'm opening the console view programatically the first
time, but that should not matter.

@Test
public void canOpenConsoleView() throws Exception {
syncExec(new VoidResult() {

public void run() {
try {

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().showView( "org.eclipse.ui.console.ConsoleView");
} catch (PartInitException e) {
e.printStackTrace();
}
}
});
bot.viewByTitle("Problems").show();
bot.viewByTitle("Console").show();
}

-- Ketan

On 1/14/10 3:26 PM, Robert M. Fuhrer wrote:
> The following always fails with a WidgetNotFoundException:
>
> SWTBotView consoleView= bot.viewByTitle("Console");
>
> even when I can see that the Console view is visible when this
> query executes.
>
> Is this the wrong way of getting at the Console?
>
Re: Can't access Console view? [message #507886 is a reply to message #507885] Thu, 14 January 2010 20:22 Go to previous messageGo to next message
Robert M. Fuhrer is currently offline Robert M. Fuhrer
Messages: 294
Registered: July 2009
Senior Member
Ok, this is weird - it's working now, every time. I don't know what
was wrong.

Anyway, sorry for the false alarm.

On 1/14/10 7:46 PM, Ketan Padegaonkar wrote:
> Seems to work for me. Do you have a stack trace to help diagnose ?
>
><...snip...>
>
> On 1/14/10 3:26 PM, Robert M. Fuhrer wrote:
>> The following always fails with a WidgetNotFoundException:
>>
>> SWTBotView consoleView= bot.viewByTitle("Console");
>>
>> even when I can see that the Console view is visible when this
>> query executes.
>>
>> Is this the wrong way of getting at the Console?

--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
Re: Can't access Console view? [message #508029 is a reply to message #507886] Fri, 15 January 2010 10:41 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
On 1/14/10 5:22 PM, Robert M. Fuhrer wrote:
> Anyway, sorry for the false alarm.

Perils of UI testing. Happens all the time ;)

-- Ketan
Previous Topic:Dirty editor causes failing SWTBot test to block on 'Save changes?' dialog
Next Topic:WidgetNotFound when looking for menu item?
Goto Forum:
  


Current Time: Thu Jul 31 15:44:44 EDT 2014

Powered by FUDForum. Page generated in 0.01740 seconds