I am testing my SWING Gui. I do this by using the FEST framework.
I have following input:
window.textBox("txtDatabaseConnectionString").enterText("jdbc:oracle:thin:10.254.202.27:1521:db");
it actually starts to fill in the textbox with following values:
jdbc.oracle.thin&a
And than the test crashes...
I get following exception output
java.lang.IllegalArgumentException: Invalid key code '46' at org.fest.swing.core.RobotEventGenerator.pressKey(RobotEventGenerator.java:116) at org.fest.swing.core.BasicRobot.doPressKey(BasicRobot.java:633) at org.fest.swing.core.BasicRobot.keyPressAndRelease(BasicRobot.java:618) at org.fest.swing.core.BasicRobot.type(BasicRobot.java:589) at org.fest.swing.core.BasicRobot.enterText(BasicRobot.java:572) at org.fest.swing.driver.JTextComponentDriver.enterText(JTextComponentDriver.java:126) at org.fest.swing.fixture.JTextComponentFixture.enterText(JTextComponentFixture.java:208) at gui.GuiTest.shouldCopyTextInLabelWhenClickingButton(GuiTest.java:44)
FEST had lot of issues regarding keyboard layouts. If your locale are not en_gb/en_us
you may get that kind of problems. The keyboard input depends on your keyboard layout which is different in many countries and operating system. I noticed that it also changes the :
into .
in your example. In sources here there are only gb/en/de mappings. To solve the problem you can add your own keyboard mappings, as explained in this article: http://alexruiz.developerblogs.com/?p=1102
FEST looks like abandoned project and I am not sure if those are latest sources.