SwtbotEclipseEditor.typeText() fails in Eclipse cocoa [message #701436] |
Mon, 25 July 2011 01:40  |
Eclipse User |
|
|
|
I am trying to use typeText() of SWTBotEclipseEditor in Eclipse 3.7 Cocoa. It fails with following message:
java.awt.AWTException : headless environment.
If I change Keyboard_strategy to SWTKeyboardStrategy , it fails with different message , "Could not post key event".
I have also set Keyboard_layout as MAC_EN_US. No clue whats happening. Any help would be appreciated
Here is my code,
SWTBotPreferences.KEYBOARD_STRATEGY = "org.eclipse.swtbot.swt.finder.keyboard.SWTKeyboardStrategy";
if(SWT.getPlatform().equals("cocoa"))
SWTBotPreferences.KEYBOARD_LAYOUT = "MAC_EN_US";
.....
.....
.....
SWTBotEclipseEditor textEditor = currentEditor.toTextEditor();
textEditor.typeText("testme");
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09690 seconds