error : unable to resolve class reference org/openqa/selenium/WebDriver
I've this code
When I execute this code in my IDE (eclipse). My browser open a window with google.
But if I execute this code in cmd or in Jenkins, I've this error :
[[TestNGClassFinder]] Unable to read methods on class demo.DemoJenkins - unable to resolve class reference org/openqa/selenium/WebDriver
I followed this tuto https://www.youtube.com/watch?v=1e8I3A49ERc and I did everything like him, but when I would like to open a browser with this code with Jenkins or cmd. I've a error.
I use Selenium webdriver, TestNG, Java for writing code. if anyone can help me, thanks a lot !
you have to add the selenium-api.jar to your classpath,
How do you run your test via Jenkins?
Try to create a maven project and run it via it. It will be easier to maintain and use if you want to use your project longer.