MarkusBernhardt / robotframework-selenium2library-java

Java port of the Selenium 2 (WebDriver) Python library for Robot Framework
Apache License 2.0
46 stars 48 forks source link

Error: Could not find or load main class #68

Closed asitishere closed 9 years ago

asitishere commented 9 years ago

Created the dependance file using mvn package and then tried executing the test cases from command line.

Failed with "Could not find or load main class"

C:\digital-testing\robotframework-Redesign\target>java -cp robotframework-2.8.7. jar robotDep.jar org.robotframework.RobotFramework myTest.txt Error: Could not find or load main class robotDep.jar

asitishere commented 9 years ago

I tried the same way Mark suggested in one of the post

MarkusBernhardt commented on 11 Dec 2013 Hi, also the fat jar does not contain the robotframework itself. You need to get also that jar and put both into the classpath. Don't use the "-jar" option. Use the "-cp" option. Something like: java -cp robotframework-2.8.1.jar;robotframework-selenium2library-java-1.4.0.0-jar-with-dependencies.jar org.robotframework.RobotFramework myTest.txt Cheers, Markus

asitishere commented 9 years ago

Please suggest once i compile my java files and on any change in Test cases on command mvn integartion-test it re compile and then run.

Is there any way to ONLY run the testing using the old .class file considering no change in code.

Please please suggest .

HelioGuilherme66 commented 9 years ago

I think you missed a ; in the classpath for robotDep.jar. Try this: java -cp robotframework-2.8.7.jar;robotDep.jar org.robotframework.RobotFramework myTest.txt

On Wed, Jun 17, 2015 at 11:45 PM, Asit notifications@github.com wrote:

Please suggest once i compile my java files and on any change in Test cases on command mvn integartion-test it re compile and then run.

Is there any way to ONLY run the testing using the old .class file considering no change in code.

Please please suggest .

— Reply to this email directly or view it on GitHub https://github.com/MarkusBernhardt/robotframework-selenium2library-java/issues/68#issuecomment-112973348 .

asitishere commented 9 years ago

Thanks a Ton Guilherme It worked for me.

Shall I ask few other queries if you fine related to robot framework Java port develop by Mark.