Error is displayed when the Selenium web driver java program is executed in Command prompt.But the same is working properly with no error in Eclipse.
1.Available solutions are tried but the error remains the same.
2.Testng jar file is added to the lib folder and the path set in the cmd
3.I need to run the child class which is derived from parent class.Both parent class and child classes are in the same package
Error:
Error: Could not find or load main class org.testng.TestNG
Please find the attached screenshot
Commands:
F:>cd Workspace3\OTN_test_Automation `F:\Workspace3\OTN_test_Automation>java -cp F:\Workspace3\OTN_test_Automation\lib *;F:\Workspace3\OTN_test_Automation\bin org.testng.TestNG testng.xml Error: Could not find or load main class org.testng.TestNG
F:\Workspace3\OTN_test_Automation>java -cp F:\Workspace3\OTN_test_Automation\lib *;F:\Workspace3\OTN_test_Automation\bin org.testng.TestNG testng.xml Error: Could not find or load main class org.testng.TestNG`