WebDriver driver = new FirefoxDriver();
Selenium versions: See attachment.
I get this EXCEPTION:
Exception in thread "main" java.lang.NoClassDefFoundError: org/json/JSONException
at org.openqa.selenium.firefox.Preferences.readDefaultPreferences(Preferences.java:96)
at org.openqa.selenium.firefox.Preferences.<init>(Preferences.java:66)
at org.openqa.selenium.firefox.FirefoxProfile.<init>(FirefoxProfile.java:88)
at org.openqa.selenium.firefox.FirefoxProfile.<init>(FirefoxProfile.java:78)
at org.openqa.selenium.firefox.FirefoxProfile.<init>(FirefoxProfile.java:67)
at org.openqa.selenium.firefox.FirefoxDriver.getProfile(FirefoxDriver.java:293)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:269)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:221)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:216)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:212)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:125)
at com.common.eTest.eTestScreenCaptureFactory$Test.main(eTestScreenCaptureFactory.java:219)
Caused by: java.lang.ClassNotFoundException: org.json.JSONException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 13 more
thank you for any support
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8473321d-6cb6-408e-984d-8c886ca85e6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8688ec6a-065c-4d11-996b-b83277d89cba%40googlegroups.com.
WebDriver driver = (WebDriver) new FirefoxDriver();
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gson/JsonElement
at org.openqa.selenium.firefox.Preferences.readDefaultPreferences(Preferences.java:96)
at org.openqa.selenium.firefox.Preferences.<init>(Preferences.java:66)
at org.openqa.selenium.firefox.FirefoxProfile.<init>(FirefoxProfile.java:88)
at org.openqa.selenium.firefox.FirefoxProfile.<init>(FirefoxProfile.java:78)
at org.openqa.selenium.firefox.FirefoxProfile.<init>(FirefoxProfile.java:67)
at org.openqa.selenium.firefox.FirefoxDriver.getProfile(FirefoxDriver.java:293)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:269)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:116)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:221)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:216)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:212)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:125)
at com.common.eTest.eTestScreenCaptureFactory$Test.main(eTestScreenCaptureFactory.java:221)
Caused by: java.lang.ClassNotFoundException: com.google.gson.JsonElement
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 13 more
--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/OFqJWSUs6FE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLnb6Ah66WeNwLbHQcg-1agmvVEKAF-n9ynLj7o36UViBA%40mail.gmail.com.
WebDriver driver = (WebDriver) new FirefoxDriver();
With this exception:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gson/JsonElement
at org.openqa.selenium.firefox.Preferences.readDefaultPreferences(Preferences.java:96)
at org.openqa.selenium.firefox.Preferences.<init>(Preferences.java:66)
at org.openqa.selenium.firefox.FirefoxProfile.<init>(FirefoxProfile.java:88)
at org.openqa.selenium.firefox.FirefoxProfile.<init>(FirefoxProfile.java:78)
at org.openqa.selenium.firefox.FirefoxProfile.<init>(FirefoxProfile.java:67)
at org.openqa.selenium.firefox.FirefoxDriver.getProfile(FirefoxDriver.java:293)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:269)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:116)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:221)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:216)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:212)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:125)
at com.common.eTest.eTestScreenCaptureFactory$Test.main(eTestScreenCaptureFactory.java:221)
Caused by: java.lang.ClassNotFoundException: com.google.gson.JsonElement
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 13 more
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/auth/Credentials
at org.openqa.selenium.remote.HttpCommandExecutor.getDefaultClientFactory(HttpCommandExecutor.java:89)
at org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:63)
at org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:58)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:97)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:276)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:116)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:221)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:216)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:212)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:125)
at com.common.eTest.eTestScreenCaptureFactory$Test.main(eTestScreenCaptureFactory.java:221)
Caused by: java.lang.ClassNotFoundException: org.apache.http.auth.Credentials
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 11 more
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/exec/Executor
at org.openqa.selenium.os.CommandLine.<init>(CommandLine.java:47)
at org.openqa.selenium.firefox.FirefoxBinary.startProfile(FirefoxBinary.java:97)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:110)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:276)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:116)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:221)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:216)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:212)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:125)
at com.common.eTest.eTestScreenCaptureFactory$Test.main(eTestScreenCaptureFactory.java:221)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.exec.Executor
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 10 more
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/610189d4-27b5-4fa2-bfbf-5dfdd01e8e3e%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/cdf1808b-5033-4a7e-9033-df0a0f4e9f21%40googlegroups.com.
WebDriver driver = new ChromeDriver();
I keep getting exceptions:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/exec/Executor
at org.openqa.selenium.os.CommandLine.<init>(CommandLine.java:38)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:161)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:63)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:568)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:116)
at com.common.eTest.eTestScreenCaptureFactory$Test.main(eTestScreenCaptureFactory.java:223)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.exec.Executor
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 11 more
I would think I just need to add the selenium jar files into my project and it should work. Changing to a POM file will not change how I debug items.
Question:
Do I need to set some system variables to the exe? I never did that before?
System.setProperty("webdriver.chrome.driver", "/Applications/Google Chrome.app");
thank you for the help.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/744b6126-d850-49d1-b166-8654e7a57b6b%40googlegroups.com.