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 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.

Need Your Help

How to call stop to MediaElement after a set duration?

c# wpf mediaelement

I have added a media element to a WPF window that plays a gif file. But I'm not sure how to stop the gif playing after a set number of seconds.

Cross-compiler library communication

c++ visual-c++ c++builder cross-compiling

I need to develop a C++ front-end GUI using MSVC that needs to communicate with the bank-end library that is compiled with C++ Builder.