Вопрос

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