Reputation: 31
I need some help setting up a Robot Framework with Selenium - both standalone. My configuration is Jenkins + RobotFramework + Selenium all in Standalone Mode.
I Want to preconfigure a Job using a test set that is shipped with my self made bundle. In the end I want to make jenkins Job that comes with the selfmade package bundle to something like a automated installation qualification.
Everything starts up fine but my test can not load the selenium libs for web test, my last attemp was the following: -Start Jenkins
java -DJENKINS_HOME="%~dp0\jenkins_home" -jar jenkins.war --httpPort=8081 --webroot="%~dp0\jenkins"
-Start Selenium Server
java -jar selenium-server-standalone-2.42.2.jar
-Start Robot Job in Jenkins
java -Xbootclasspath/a:selenium-2.45.0/*.jar:selenium-2.45.0/libs/*.jar -jar %JENKINS_HOME%\jenkins_home\robotframework-2.8.7.jar %JENKINS_HOME%\jenkins_home\tests\myTest.txt
Sadly I am facing an error : "Importing test library 'Selenium2Library' failed: ImportError: No module named Selenium2Library" I tried several approaches to get it running.
Because of some preconditions I can not manipulate the contens of the Robot oder any othe .jar Slowly I feel this is impossible.
Upvotes: 0
Views: 1346
Reputation: 31
I simply unpacked the selenium .tar package and took out the Libs and put them into %jenkins_home%\Lib\SeleniumLibrary\ This worked for me.
Upvotes: 0
Reputation: 4820
Your test obviously requires Selenium2Library which is not a standard RF library and needs to be installed/downloaded separately.
In this case (running RF from standalone jar) you need the java version of Selenium2Library which can be downloaded from here.
If you have all three jars in a directory you could run your tests from that directory like this:
java -cp robotframework-2.8.7.jar;robotframework-selenium2library-java-1.4.0.6-jar-with-dependencies.jar;selenium-server-standalone-2.42.2.jar org.robotframework.RobotFramework %JENKINS_HOME%\jenkins_home\tests\myTest.txt
(looks like you are on Windows - otherwise use : as classpath separator)
Upvotes: 1