Hi --
I'm new to Watij, and I've been banging my head against the wall
trying to get the simple GoogleTest example to work with Intellij,
with no success. I was successful in running the sample test through
the interactive shell.
I have performed the following steps:
1) Downloaded and extracted watij_release3.0_BETA (NOTE: I started
with 2.0 in which I also saw these results)
2) Copied jniwrap.dll into C:/WINDOWS/system32
3) Created a new project called GoogleTest in IntelliJ
4) Added a lib folder at the same level as src within the project and
copied all jars from lib within Watij to it
5) Added a library to my module pointing to the lib folder created in
(4)
6) Appended all of the jars in lib to my System classpath
The problems I am seeing are as follows:
1) watij.finders.SymbolFactory does not seem to exist
2) IntelliJ suggests I import watij.IE, which I do
3) The app crashes on ie.start("
http://www.google.com"); with the
below trace
4) In ie.textField(name, "q"); name is never defined. Why does this
even work in the interactive shell?
If any newbie-tolerant person out there can offer some insight, I'd
very much appreciate it.
java.lang.NoClassDefFoundError: com/tapsterrock/jiffie/WindowListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at watij.IE.start(IE.java:73)
at watij.IE.start(IE.java:68)
at WatijTest.testGoogleSearch(WatijTest.java:10)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.junit.JUnitStarter.main
(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:
90)
Caused by: java.lang.ClassNotFoundException:
com.tapsterrock.jiffie.WindowListener
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 38 more