我试图自动化添加标记并通过java程序删除它的过程。对于同样的我试图获得Arbortext编辑器窗口控件。以下是这段代码:
Runtime.getRuntime().exec("C:/Program Files (x86)/PTC/Arbortext Editor/bin/x86/editor.exe"+" "+"C:/JWBIntegration/JWBIntegeration/resource/testdata/Ia53cfdb05f8e11e49822a9299f05e77f.xml");
LOG.info("Arbortext Loaded");
Thread.sleep(30000);
Window windowHandler = Application.getActiveWindow();
LOG.info(windowHandler);
windowHandler.close();
根据代码,编辑应该关闭。但该程序终止时出现以下错误
java.lang.UnsatisfiedLinkError: com.arbortext.epic.Application._GetActiveWindow()J
at com.arbortext.epic.Application._GetActiveWindow(Native Method)
at com.arbortext.epic.Application.access$700(Application.java:38)
at com.arbortext.epic.Application$8.call(Application.java:500)
at com.arbortext.epic.Application$8.call(Application.java:498)
at com.arbortext.epic.AOMAccessController.execute(AOMAccessController.java:150)
at com.arbortext.epic.Application.getActiveWindow(Application.java:511)
at com.thomson.integration.content.AdditionalPartiesUpdateTest.testMetaData(AdditionalPartiesUpdateTest.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
我被困在这里。无法获得窗口处理程序,无法进一步添加AP标记。上图是我的Arbortext编辑器的截图。在最下面的行中有一个名为AP的标签,后跟K和TC。我只需要通过java代码将此标记放入我的内容中。 怎么做?
答案 0 :(得分:0)
您应该考虑在https://www.ptcusercommunity.com/发布此问题 如果您想自动化Arbortext,您还应该参考Arbortext帮助中心的手册。虽然在整个手册中都有关于ACL的一般文档,但您确实需要Arbortext命令语言参考。您也可以通过PTC支持帐户在线获取此文档: http://support.ptc.com/cs/help/arbortext_hc/ae70_hc/index.jspx?id=ID3907018505&action=show