How to use SSHLibrary with Robotframework standalone jar?

319 views
Skip to first unread message

Dennis Li

unread,
Jun 6, 2014, 5:55:01 AM6/6/14
to robotframe...@googlegroups.com
Hi all,

I'm using standalone Robotframework+Selenium2(robotframework-selenium2library-java-1.4.0.6-jar-with-dependencies.jar) for testing.
My test command is like this: java -cp robotframework-selenium2library-java-1.4.0.6-jar-with-dependencies.jar org.robotframework.RobotFramework.jar testcase.txt, and it works well!

I know there is a SSHLibrary installation guide for Jython on https://code.google.com/p/robotframework-sshlibrary/wiki/InstallationInstructions#Jython, but I think it is a different case to mine, because I actually don't need to install Jython at all.

Does anyone can give me some hints or any experience?

Thanks in advance!

Dennis

Janne Härkönen

unread,
Jun 9, 2014, 1:20:43 AM6/9/14
to robotframework-users
Forwarding this reply to the group also...

---------- Forwarded message ----------
From: Janne Härkönen <janne.h...@iki.fi>
Date: Fri, Jun 6, 2014 at 5:42 PM
Subject: Re: How to use SSHLibrary with Robotframework standalone jar?
To: denni...@gmail.com


On Fri, Jun 6, 2014 at 4:50 PM, Janne Härkönen <janne.h...@iki.fi> wrote:

In theory this should be possible by adding the SSH library sources inside the standalone jar with the jar command line tool. The standalone jar distribution also contains Jython, and by injecting SSH Library sources under Lib/ in the jar, the library import should work. 

Replying to myself...
This indeed works. Here's step-by-step

1) create empty directory, copy robotframework-selenium2library-java-1.4.0.6-jar-with-dependencies.jar there
2) cd into that dir
3) mkdir Lib
4) cp -r robotframework-sshlibrary/src/* Lib
5) jar uf robotframework-selenium2library-java-1.4.0.6-jar-with-dependencies.jar Lib
6) java -cp robotframework-selenium2library-java-1.4.0.6-jar-with-dependencies.jar:robotframework-sshlibrary/lib/trilead-ssh2-1.0.0-build217.jar org.robotframework.RobotFramework test.txt

hth,
--Janne


Dennis Li

unread,
Jun 9, 2014, 9:43:23 PM6/9/14
to robotframe...@googlegroups.com, janne.h...@iki.fi
Hi Janne,

  Thanks for your supporting, it works!

regards,
Dennis
Reply all
Reply to author
Forward
0 new messages