Cannot use SwingLibrary in Robot Framework from RemoteApplication
-
23-12-2019 - |
문제
I am getting below error when I am trying to use the SwingLibrary
java.lang.ClassCastException: SwingLibrary cannot be cast to org.robotframework.javalib.library.RobotJavaLibrary
My Keyword is written like below
*** Keywords ***
Start Demo Application
[Arguments] ${name}
Start Application ${name} java ${MAIN CLASS} 10 seconds ${LIB DIRECTORY}
Take Library Into Use SwingLibrary
I see that my application does get invoked but I get error.
Please help.
해결책
EDIT: this issue was fixed in the 1.9.1 release.
The newest version of SwingLibrary no longer implements AnnotationLibrary (which implements RobotJavaLibrary). It has the necessary methods so you should be able to subclass it and use that library with RemoteApplications.
public class RemotableSwingLibrary extends SwingLibrary implements RobotJavaLibrary {}
제휴하지 않습니다 StackOverflow