我在终端模拟器 IBM PCOMM 应用程序上运行自动化,框架由 maven +leaft +cucumber+java + junit 组成,当我从运行程序文件运行该功能时,我能够执行测试,但是当我通过命令提示符使用 maven 命令时,它正在打开应用程序但无法输入任何内容
Maven命令:
mvn clean verify -Dcucumber.filter.tags="@Mainframe"
以下是用于启动的命令:
ModifiableSDKConfiguration sdkConfig = new ModifiableSDKConfiguration();
sdkConfig.setServerAddress(new URI("ws://localhost:5095"));
SDK.init(sdkConfig);
File file = new File(filePath);
java.awt.Desktop.getDesktop().open(file);
插入文本:
screen.describe(Field.class,
new FieldDescription.Builder().startPosition(row, col).isProtected(false).visible(true).build())
.setText(text);
screen.sync();
Leanft 版本:14.53
画面逻辑:
Window teWindow = Desktop.describe(Window.class, new WindowDescription.Builder().shortName(new RegExpProperty(".*")).build());
Screen screen = teWindow.describe(Screen.class, new ScreenDescription.Builder().label(new RegExpProperty(".*")).build());
错误:
com.hp.lft.sdk.ReplayObjectNotFoundException: Cannot find the "Terminal Emulators Field" object's parent "Terminal Emulators Window" (class TeWindow). Verify that parent properties match an object currently displayed in your application.
如果我尝试使用 LeanFT 终端仿真器技术打开应用程序,则会出现以下错误:
com.hp.lft.sdk.GeneralLeanFtException: spawn UNKNOWN
at com.hp.lft.sdk.internal.GeneralExceptionFactory.createDefault(GeneralExceptionFactory.java:154)
at com.hp.lft.sdk.internal.GeneralExceptionFactory.createDefault(GeneralExceptionFactory.java:8)
at com.hp.lft.sdk.internal.CommunicationClientImpl.handleError(CommunicationClientImpl.java:224)
at com.hp.lft.sdk.internal.CommunicationClientImpl.send(CommunicationClientImpl.java:96)
at com.hp.lft.sdk.internal.AutLaunchHelper$1.invoke(AutLaunchHelper.java:80)
at com.hp.lft.sdk.internal.AutLaunchHelper$1.invoke(AutLaunchHelper.java:61)
at com.hp.lft.sdk.internal.TestObjectOperationWrapper.executeWithEvents(TestObjectOperationWrapper.java:120)