Hi All,
I am very new to Watij. When I am executing simple watij program(pls
note two lines are commented) the following error message has been
populated. I have checked in Watij.jar file there is not class with
the name 'IWshShell3'. I could not find same in net also. someone can
help me please saying what shold do to fix this issue.
Error msg...
Exception in thread "main" java.lang.NoClassDefFoundError: watij/
iwshruntimelibrary/IWshShell3
at watij.runtime.ie.IE.waitUntilDocumentComplete(IE.java:409)
at watij.runtime.ie.IE.waitUntilDocumentInitializedAndComplete
(IE.java:403)
at watij.runtime.ie.IE.doWaitUntilReady(IE.java:385)
at watij.runtime.ie.IE.waitUntilReady(IE.java:359)
at watij.runtime.ie.IE.html(IE.java:339)
at watij.runtime.ie.IE.document(IE.java:420)
at watij.runtime.ie.IE.element(IE.java:427)
at watij.BaseContainer.htmlElements(BaseContainer.java:22)
at watij.BaseHtmlFinder.htmlElements(BaseHtmlFinder.java:551)
at watij.BaseHtmlFinder.textFields(BaseHtmlFinder.java:56)
at watij.BaseHtmlFinder.textField(BaseHtmlFinder.java:52)
at GoogleTest.testGoogleSearch(GoogleTest.java:11)
at GoogleTest.main(GoogleTest.java:19)
My program...
import junit.framework.TestCase;
import watij.runtime.ie.*;
//import watij.iwshruntimelibrary.IWshShell3;
//import watij.iwshruntimelibrary.WshShell;
import static watij.finders.SymbolFactory.*;
public class GoogleTest extends TestCase {
public void testGoogleSearch() throws Exception {
IE ie = new IE();
ie.start("
http://www.google.com");
ie.textField(name,"q").set("Watij");
ie.button("Google Search").click();
assertTrue(ie.containsText("/Web Application Testing in
Java/"));
}
public static void main(String str[]) {
GoogleTest obj = new GoogleTest();
try
{
obj.testGoogleSearch();
}
catch (Exception e)
{
System.out.println(e);
}
}
}