KeyStrokes don't work anymore with Mac [message #1801499] |
Mon, 21 January 2019 05:03  |
Eclipse User |
|
|
|
Hi,
I have migrated my Eclipse plugins project to eclipse 2018-12, checked with latest swtbot 2.8 or 2.9 versions....
My testcase is:
@RunWith(SWTBotJunit4ClassRunner.class)
public class SmallUiTest {
@Test
public void simpleTest() throws Exception {
//Close the welcome dialog
SWTWorkbenchBot swtWorkbenchBot = new SWTWorkbenchBot();
swtWorkbenchBot.viewByTitle("Welcome").close();
//Try to open "Open resource" dialog with COMMAND-SHIFT-R, but doesn't open anything
swtWorkbenchBot.activeShell().pressShortcut(SWT.COMMAND | SWT.SHIFT, 'R');
SWTBotShell openResourceShell = swtWorkbenchBot.shell("Open Resource");
System.out.println (openResourceShell.getText());
}
}
and I expect the "Open resource" dialog to open, but this seems to fail
I am using macOs 10.14.2, jdk 1.8.0_191-b1.
Would be nice if you could give me a hint why this does not work anymore. This code worked with same version of swtbot but older eclipse (and perhaps older version of macos - don't know exactly anymore).
Thanks in advance
Cheers
Markus
|
|
|
|
|
|
|
Re: KeyStrokes don't work anymore with Mac [message #1801622 is a reply to message #1801595] |
Wed, 23 January 2019 13:13  |
Eclipse User |
|
|
|
Hmm, that warning could be related, see this blog post: https://indiestack.com/2018/08/let-it-rip/ . Seems to be related to keyboard shortcuts...
Are you able to run in a debugger step-by-step to see when the warning occurs? It could be in a static initializer or constructor the first time you access SWTBot's keyboard classes...
Not sure if it would change anything, but also try:
tree.pressShortcut(Keystrokes.COMMAND, Keystrokes.SHIFT, KeyStroke.getInstance('R'));
|
|
|
Powered by
FUDForum. Page generated in 0.04641 seconds