문제

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 {}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top