robot framework user java libraries error Test Library “mavenPackage.MyKeyWords.java” does not exist

浪子不回头ぞ 提交于 2019-12-23 05:09:48

问题


I am learning RObotoframework using - Java. With user defined java file I am getting error "Test Library 'mavenPackage.MyKeyWords.java' does not exist".

If I don't use this file, test is running fine. Only for importing my .Java file, I see this error. Please help!

I installed Jython. In my "C:\robotfw" I placed... 1. robotframework-2.8.1.jar 2. robotframework-selenium2library-java-1.2.0.13-jar-with-dependencies 3. I placed the whole Java package folder (mavenPackage) here. Inside of this the .java file exists. (mavenPackage.MyKeywords.java)

I set the Classpath for the 1 and 2 JARS.

testcase.txt

* Settings *

Library Selenium2Library

Library mavenPackage.MyKeywords.java


回答1:


You can't import directly the java file. You must compile it and put it in your classpath according to the package of the class.

In your classpath you need RF jar, selenium jar and your classes.

You don't even need Jython as it is included in RF jar.



来源:https://stackoverflow.com/questions/20320799/robot-framework-user-java-libraries-error-test-library-mavenpackage-mykeywords

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!