Robot Framework-RIDE,Import Java Libraries

匿名 (未验证) 提交于 2019-12-03 00:44:02

问题:

Have Installed Robot Framework IDE. After installation, how to import jar files into RIDE.

Have tried to add jar through add import option present in the test suite. but its not being recognized(Keywords not found error).

If we import the jar files should the test run in execution Profile as Jybot?

When i try to run the test case as Jybot,am getting info as follow:

Robot Framework installation not found. To run tets, you need to install Robot Framework separately. See http://robotframework.org for installation instructions.

回答1:

First you will need to install jython. You can check the instructions here. This will enable you to run tests using Jybot.

Then you need to make sure your Java library is in the classpath. Or you can set the --pythonpath argument for Jybot.

This is what I use to run my tests (just put this in the 'Arguments' input field):

--pythonpath lib\STAR.jar:lib --escape star:STAR 

Use : to separate additional folders. The --escape star:STAR argument enables the use of * to include all *.jar files in the folder.

I had some trouble with including libraries in folders with space in their name so I use --escape space:= which replaces the = symbol with a space. For example:

--pythonpath "path=with=spaces\lib\STAR.jar" --escape star:STAR --escape space:= 

If you want to use the selenium2 library with Jython I suggest you download the selenium2library for Java.



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