Я пытался автоматизировать процесс добавления тега и удаления его через java-программу. Для того же я пытался получить редактор окна редактора Arbortext. И Был ли этот код ниже:Как добавить новый тег в содержимое через java-программу в редакторе Arbortext 7.0
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-код. Как это сделать?
Также поднят такой же вопрос, но нет ответа. – ElmosTech