Run Selenium Java Code on Jenkins master using shell -
i'm trying run java selenium code on jenkins using shell command. java file needs 3 .jar
files in order run. tired, among other commands, javac "*.jar" myfile.java
not working.
i'm pulling code form repository , master node running redhat 6. when run javac myfile.java
follwoing error messgae:
java version "1.8.0_92" java(tm) se runtime environment (build 1.8.0_92-b14) java hotspot(tm) 64-bit server vm (build 25.92-b14, mixed mode) clusterreloadaut.java:3: error: package org.openqa.selenium not exist import org.openqa.selenium.by; ^ clusterreloadaut.java:5: error: package org.openqa.selenium not exist import org.openqa.selenium.webdriver; ^ clusterreloadaut.java:6: error: package org.openqa.selenium.firefox not exist import org.openqa.selenium.firefox.firefoxdriver; ^ clusterreloadaut.java:11: error: cannot access webdriver static webdriver driver = new firefoxdriver(); ^ bad class file: ./webdriver.class class file contains wrong class: org.openqa.selenium.webdriver please remove or make sure appears in correct subdirectory of classpath. build step 'execute shell' marked build failure finished: failure
to compile myfile.java
myfile.class
(so can run java
command) need add -cp path/to/selenium.jar
javac
command. this:
javac -cp path/to/selenium.jar myfile.java
Comments
Post a Comment