0

When I run my TestNG xml file from eclipse it runs fine when I run it from a command prompt I get java.lang.NoSuchMethodError: org.openqa.selenium.chrome.ChromeOptions.addArguments([Ljava/lang/String;)Lorg/openqa/selenium/chrome/ChromeOptions; if I change browser I get a similar [Ljava/lang/String;)

  • Obviously, from command line, your classpath is missing the required jars. – SiKing Dec 18 '18 at 00:05
  • Please edit your question and add information related to how are you maintaining your classpath ? Do you use a build tool such as Gradle/Maven/Ant? If yes, what does the build file [build.gradle/pom.xml/build.xml] look like. Please show its contents. When you say you are running from command prompt, please tell us how are you doing it. Please show us the command – Krishnan Mahadevan Dec 18 '18 at 04:34
  • see this https://stackoverflow.com/questions/11896791/how-to-run-testng-from-command-line – murali selenium Dec 18 '18 at 10:29

0 Answers0