我在测试我的秋千。我是通过使用FEST框架来做到这一点的。
我有以下意见:
window.textBox("txtDatabaseConnectionString").enterText("jdbc:oracle:thin:10.254.202.27:1521:db");它实际上开始用以下值填充文本框:
jdbc.oracle.thin&a
而不是测试崩溃..。
我得到以下异常输出
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)上的无效密钥代码'46‘在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)
发布于 2015-04-29 14:40:48
FEST在键盘布局方面有很多问题。如果您的地区不是en_gb/en_us,您可能会遇到这样的问题。键盘输入取决于您的键盘布局,这在许多国家和操作系统是不同的。我注意到,在您的示例中,它还将:更改为.。在源这里中,只有gb/en/de映射。要解决这个问题,可以添加您自己的键盘映射,如本文所解释的:http://alexruiz.developerblogs.com/?p=1102
FEST看起来像是被放弃的项目,我不确定这些是否是最新的来源。
https://stackoverflow.com/questions/29944144
复制相似问题