简体   繁体   English

Fest Swing GUI框架,奇怪的输出

[英]Fest swing gui framework, strange output

I am testing my SWING Gui. 我正在测试我的SWING Gui。 I do this by using the FEST framework. 我通过使用FEST框架来做到这一点。

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 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) java.lang.IllegalArgumentException:org.fest.swing.core.BasicRobot.doPressKey(BasicRobot.java:633)上的org.fest.swing.core.RobotEventGenerator.pressKey(RobotEventGenerator.java:116)处的无效键代码'46'在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。 shouldCopyTextInLabelWhenClickingButton(GuiTest.java:44)

FEST had lot of issues regarding keyboard layouts. FEST在键盘布局方面存在很多问题。 If your locale are not en_gb/en_us you may get that kind of problems. 如果您的语言环境不是en_gb/en_us ,则可能会遇到此类问题。 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. 这里的源中只有gb / en / de映射。 To solve the problem you can add your own keyboard mappings, as explained in this article: http://alexruiz.developerblogs.com/?p=1102 要解决此问题,您可以添加自己的键盘映射,如本文所述: http : //alexruiz.developerblogs.com/?p=1102

FEST looks like abandoned project and I am not sure if those are latest sources. FEST看起来像是被遗弃的项目,我不确定这是否是最新消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM