Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Fest swing gui框架,奇怪的输出_Java_Swing_Input_Fest - Fatal编程技术网

Java Fest swing gui框架,奇怪的输出

Java Fest swing gui框架,奇怪的输出,java,swing,input,fest,Java,Swing,Input,Fest,我正在测试我的SWING Gui。 我使用FEST框架来实现这一点 我有以下意见: window.textBox("txtDatabaseConnectionString").enterText("jdbc:oracle:thin:10.254.202.27:1521:db"); 它实际上开始用以下值填充文本框: jdbc.oracle.thin&a 然后测试崩溃了 我得到以下异常输出 java.lang.IllegalArgumentException:位于的密钥代码“46”无效 org.f

我正在测试我的SWING Gui。 我使用FEST框架来实现这一点

我有以下意见:

window.textBox("txtDatabaseConnectionString").enterText("jdbc:oracle:thin:10.254.202.27:1521:db");
它实际上开始用以下值填充文本框:

jdbc.oracle.thin&a

然后测试崩溃了

我得到以下异常输出

java.lang.IllegalArgumentException:位于的密钥代码“46”无效 org.fest.swing.core.RobotEventGenerator.pressKey(RobotEventGenerator.java:116) 位于org.fest.swing.core.BasicRobot.doPressKey(BasicRobot.java:633) org.fest.swing.core.BasicRobot.keyPressAndRelease(BasicRobot.java:618) 在org.fest.swing.core.BasicRobot.type(BasicRobot.java:589)中 org.fest.swing.core.BasicRobot.enterText(BasicRobot.java:572)位于 org.fest.swing.driver.JTextComponentDriver.enterText(JTextComponentDriver.java:126) 在 org.fest.swing.fixture.JTextComponentFixture.enterText(JTextComponentFixture.java:208) 在 当单击按钮时,gui.GuiTest.shouldCopyTextInBellWhenClickingButton(GuiTest.java:44)


FEST在键盘布局方面有很多问题。如果您的区域设置不是
en_gb/en_us
,您可能会遇到此类问题。键盘输入取决于键盘布局,这在许多国家和操作系统中是不同的。我注意到它还将示例中的
更改为
。在源中,只有gb/en/de映射。要解决此问题,您可以添加自己的键盘映射,如本文所述:


FEST看起来像一个废弃的项目,我不确定这些是否是最新的源。

或者我将insertText方法更改为setText?