0

我正在尝试使用 Marathon Java 驱动程序(5.2.6.0 和 5.4)自动化一个 Java 应用程序,并且我能够成功执行而没有问题。但是,我经常从 Marathon Java 驱动程序中得到以下异常,并立即停止执行。任何有关如何解决此问题的指示都将受到高度赞赏。

net.sourceforge.marathon.javafxagent.JavaAgentException
    at net.sourceforge.marathon.javafxagent.server.JavaServer.invoke(JavaServer.java:514)
    at net.sourceforge.marathon.javafxagent.server.JavaServer.handleRoute(JavaServer.java:408)
    at net.sourceforge.marathon.javafxagent.server.JavaServer.serve_internal(JavaServer.java:371)
    at net.sourceforge.marathon.javafxagent.server.JavaServer.serve(JavaServer.java:326)
    at fi.iki.elonen.NanoHTTPD.serve(NanoHTTPD.java:2244)
    at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945)
    at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.ConcurrentModificationException
    at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:386)
    at java.util.AbstractList$Itr.next(AbstractList.java:355)
    at com.sun.javafx.scene.shape.PathUtils.configShape(PathUtils.java:45)
    at javafx.scene.shape.Path.impl_configShape(Path.java:251)
    at javafx.scene.shape.Path.impl_configShape(Path.java:89)
    at javafx.scene.shape.Shape.impl_computeGeomBounds(Shape.java:864)
    at javafx.scene.Node.updateGeomBounds(Node.java:3577)
    at javafx.scene.Node.getGeomBounds(Node.java:3530)
    at javafx.scene.Node.getLocalBounds(Node.java:3478)
    at javafx.scene.Node.updateTxBounds(Node.java:3641)
    at javafx.scene.Node.getTransformedBounds(Node.java:3424)
    at javafx.scene.Parent.getChildTransformedBounds(Parent.java:1732)
    at javafx.scene.Parent.recomputeBounds(Parent.java:1524)
    at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388)
    at javafx.scene.Node.updateGeomBounds(Node.java:3577)
    at javafx.scene.Node.getGeomBounds(Node.java:3530)
    at javafx.scene.Node.getLocalBounds(Node.java:3478)
    at javafx.scene.Node.updateTxBounds(Node.java:3641)
    at javafx.scene.Node.getTransformedBounds(Node.java:3424)
    at javafx.scene.Parent.getChildTransformedBounds(Parent.java:1732)
    at javafx.scene.Parent.updateCachedBounds(Parent.java:1596)
    at javafx.scene.Parent.recomputeBounds(Parent.java:1535)
    at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388)
    at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:3078)
    at javafx.scene.Node.updateGeomBounds(Node.java:3577)
    at javafx.scene.Node.getGeomBounds(Node.java:3530)
    at javafx.scene.Node.computeLocalBounds(Node.java:3593)
    at javafx.scene.Node.updateLocalBounds(Node.java:3623)
    at javafx.scene.Node.getLocalBounds(Node.java:3484)
    at javafx.scene.Node.updateTxBounds(Node.java:3641)
    at javafx.scene.Node.getTransformedBounds(Node.java:3424)
    at javafx.scene.Parent.getChildTransformedBounds(Parent.java:1732)
    at javafx.scene.Parent.recomputeBounds(Parent.java:1524)
    at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388)
    at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:3078)
    at javafx.scene.Node.updateGeomBounds(Node.java:3577)
    at javafx.scene.Node.getGeomBounds(Node.java:3530)
    at javafx.scene.Node.getLocalBounds(Node.java:3478)
    at javafx.scene.Node.updateTxBounds(Node.java:3641)
    at javafx.scene.Node.getTransformedBounds(Node.java:3424)
    at javafx.scene.Parent.getChildTransformedBounds(Parent.java:1732)
    at javafx.scene.Parent.updateCachedBounds(Parent.java:1596)
    at javafx.scene.Parent.recomputeBounds(Parent.java:1535)
    at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388)
    at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:3078)
    at javafx.scene.Node.updateGeomBounds(Node.java:3577)
    at javafx.scene.Node.getGeomBounds(Node.java:3530)
    at javafx.scene.Node.getLocalBounds(Node.java:3478)
    at javafx.scene.Node.updateTxBounds(Node.java:3641)
    at javafx.scene.Node.getTransformedBounds(Node.java:3424)
    at javafx.scene.Parent.getChildTransformedBounds(Parent.java:1732)
    at javafx.scene.Parent.updateCachedBounds(Parent.java:1596)
    at javafx.scene.Parent.recomputeBounds(Parent.java:1535)
    at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388)
    at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:3078)
    at javafx.scene.Node.updateGeomBounds(Node.java:3577)
    at javafx.scene.Node.getGeomBounds(Node.java:3530)
    at javafx.scene.Node.getLocalBounds(Node.java:3478)
    at javafx.scene.Node.updateTxBounds(Node.java:3641)
    at javafx.scene.Node.getTransformedBounds(Node.java:3424)
    at javafx.scene.Parent.getChildTransformedBounds(Parent.java:1732)
    at javafx.scene.Parent.recomputeBounds(Parent.java:1524)
    at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388)
    at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:3078)
    at javafx.scene.Node.updateGeomBounds(Node.java:3577)
    at javafx.scene.Node.getGeomBounds(Node.java:3530)
    at javafx.scene.Node.getLocalBounds(Node.java:3478)
    at javafx.scene.Node.updateTxBounds(Node.java:3641)
    at javafx.scene.Node.getTransformedBounds(Node.java:3424)
    at javafx.scene.Parent.getChildTransformedBounds(Parent.java:1732)
    at javafx.scene.Parent.recomputeBounds(Parent.java:1524)
    at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388)
    at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:3078)
    at javafx.scene.Node.updateGeomBounds(Node.java:3577)
    at javafx.scene.Node.getGeomBounds(Node.java:3530)
    at javafx.scene.Node.computeLocalBounds(Node.java:3593)
    at javafx.scene.Node.updateLocalBounds(Node.java:3623)
    at javafx.scene.Node.getLocalBounds(Node.java:3484)
    at javafx.scene.Node.updateTxBounds(Node.java:3641)
    at javafx.scene.Node.getTransformedBounds(Node.java:3424)
    at javafx.scene.Parent.getChildTransformedBounds(Parent.java:1732)
    at javafx.scene.Parent.updateCachedBounds(Parent.java:1596)
    at javafx.scene.Parent.recomputeBounds(Parent.java:1535)
    at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388)
    at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:3078)
    at javafx.scene.Node.updateGeomBounds(Node.java:3577)
    at javafx.scene.Node.getGeomBounds(Node.java:3530)
    at javafx.scene.Node.computeLocalBounds(Node.java:3593)
    at javafx.scene.Node.updateLocalBounds(Node.java:3623)
    at javafx.scene.Node.getLocalBounds(Node.java:3484)
    at javafx.scene.Node.updateTxBounds(Node.java:3641)
    at javafx.scene.Node.getTransformedBounds(Node.java:3424)
    at javafx.scene.Parent.getChildTransformedBounds(Parent.java:1732)
    at javafx.scene.Parent.recomputeBounds(Parent.java:1524)
    at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388)
    at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:3078)
    at javafx.scene.Node.updateGeomBounds(Node.java:3577)
    at javafx.scene.Node.getGeomBounds(Node.java:3530)
    at javafx.scene.Node.getLocalBounds(Node.java:3478)
    at javafx.scene.Node.updateTxBounds(Node.java:3641)
    at javafx.scene.Node.getTransformedBounds(Node.java:3424)
    at javafx.scene.Parent.getChildTransformedBounds(Parent.java:1732)
    at javafx.scene.Parent.recomputeBounds(Parent.java:1524)
    at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388)
    at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:3078)
    at javafx.scene.Node.updateGeomBounds(Node.java:3577)
    at javafx.scene.Node.getGeomBounds(Node.java:3530)
    at javafx.scene.Node.getLocalBounds(Node.java:3478)
    at javafx.scene.Node.updateTxBounds(Node.java:3641)
    at javafx.scene.Node.getTransformedBounds(Node.java:3424)
    at javafx.scene.Parent.getChildTransformedBounds(Parent.java:1732)
    at javafx.scene.Parent.recomputeBounds(Parent.java:1524)
    at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388)
    at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:3078)
    at javafx.scene.Node.updateGeomBounds(Node.java:3577)
    at javafx.scene.Node.getGeomBounds(Node.java:3530)
    at javafx.scene.Node.getLocalBounds(Node.java:3478)
    at javafx.scene.Node$MiscProperties$2.computeBounds(Node.java:6472)
    at javafx.scene.Node$LazyBoundsProperty.get(Node.java:9306)
    at javafx.scene.Node$LazyBoundsProperty.get(Node.java:9276)
    at javafx.scene.Node.getBoundsInLocal(Node.java:3156)
    at net.sourceforge.marathon.javafxagent.FXEventQueueDevice.ensureVisible(FXEventQueueDevice.java:496)
    at net.sourceforge.marathon.javafxagent.FXEventQueueDevice.dispatchKeyEvent(FXEventQueueDevice.java:258)
    at net.sourceforge.marathon.javafxagent.FXEventQueueDevice.sendKey(FXEventQueueDevice.java:237)
    at net.sourceforge.marathon.javafxagent.FXEventQueueDevice.sendKeys(FXEventQueueDevice.java:228)
    at net.sourceforge.marathon.javafxagent.JavaFXElement.sendKeys(JavaFXElement.java:78)
    at net.sourceforge.marathon.javafxagent.server.JavaServer.sendKeysElement(JavaServer.java:911)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.sourceforge.marathon.javafxagent.server.JavaServer.invoke(JavaServer.java:479)
    ... 7 more ```
4

1 回答 1

0

它尝试查找的组件到那时可能尚未启用。所以尝试使用 Selenium 等待调用并等待组件启用。

于 2021-06-21T17:10:30.053 回答