when click a button which will open a shell it will hang (solved, because using pde-junit tests) [message #536096] |
Thu, 27 May 2010 03:08 |
Hao Liu Messages: 2 Registered: May 2010 Location: China BeiJing |
Junior Member |
|
|
Hello Everybody,
II try the example form User's Guide but it fail,
And when I try some other operations, when a button is opening a new shell , click it will cause hanging (eclipse 3.5)
could you help me to solve it?
many thanks!
The code from User's Guide:
@Test
public void canCreateANewJavaProject() throws Exception {
bot.menu("File").menu("New").menu("Project...").click(); //............................ hang
SWTBotShell shell = bot.shell("New Project");
shell.activate();
bot.tree().select("Java Project");
bot.button("Next >").click();
bot.textWithLabel("Project name:").setText("MyFirstProject");
bot.button("Finish").click();
// FIXME: assert that the project is actually created, for later
}
Logs:
(0 ms) [main] DEBUG: org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher#match es : matched ViewReference with text "", using matcher: with name '"Welcome"'
(391 ms) [main] DEBUG: org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher#match es : matched MenuItem with text "&File", using matcher: with mnemonic 'File'
(625 ms) [main] DEBUG: org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher#match es : matched MenuItem with text "File", using matcher: with mnemonic 'File'
(844 ms) [main] DEBUG: org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher#match es : matched MenuItem with text "&File", using matcher: with mnemonic 'File'
(1391 ms) [main] DEBUG: org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher#match es : matched MenuItem with text "&New Alt+Shift+N", using matcher: with mnemonic 'New'
(1422 ms) [main] DEBUG: org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher#match es : matched MenuItem with text "P&roject...", using matcher: with mnemonic 'Project...'
(1422 ms) [main] DEBUG: org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu#setFocus : Attempting to set focus on with mnemonic 'Project...'
............................ hang
[Updated on: Thu, 27 May 2010 06:30] Report message to a moderator
|
|
|
Re: when click a button which will open a shell it will hang [message #536098 is a reply to message #536096] |
Thu, 27 May 2010 03:59 |
Ketan Padegaonkar Messages: 873 Registered: July 2009 |
Senior Member |
|
|
You might be running the tests as pde-junit tests and not SWTBot tests.
Are you running the test using "right click>run as>swtbot test" ?
--
Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot
On 5/26/10 8:08 PM, Hao Liu wrote:
> Hello Everybody,
>
> II try the example form User's Guide but it fail,
> And when I try some other operations, when a button is opening a new
> shell , click it will cause hanging
>
> could you help me to solve it?
> many thanks!
>
>
>
>
> The code from User's Guide:
> @Test
> public void canCreateANewJavaProject() throws Exception {
> bot.menu("File").menu("New").menu("Project...").click();
> //............................ hang
>
> SWTBotShell shell = bot.shell("New Project");
> shell.activate();
> bot.tree().select("Java Project");
> bot.button("Next >").click();
>
> bot.textWithLabel("Project name:").setText("MyFirstProject");
>
> bot.button("Finish").click();
> // FIXME: assert that the project is actually created, for later
> }
>
>
>
> Logs:
> (0 ms) [main] DEBUG:
> org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher#match es :
> matched ViewReference with text "", using matcher: with name '"Welcome"'
> (391 ms) [main] DEBUG:
> org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher#match es :
> matched MenuItem with text "&File", using matcher: with mnemonic 'File'
> (625 ms) [main] DEBUG:
> org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher#match es :
> matched MenuItem with text "File", using matcher: with mnemonic 'File'
> (844 ms) [main] DEBUG:
> org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher#match es :
> matched MenuItem with text "&File", using matcher: with mnemonic 'File'
> (1391 ms) [main] DEBUG:
> org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher#match es :
> matched MenuItem with text "&New Alt+Shift+N", using matcher: with
> mnemonic 'New'
> (1422 ms) [main] DEBUG:
> org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher#match es :
> matched MenuItem with text "P&roject...", using matcher: with mnemonic
> 'Project...'
> (1422 ms) [main] DEBUG:
> org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu#setFocus : Attempting
> to set focus on with mnemonic 'Project...'
>
> ............................ hang
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03480 seconds