Subj : run httpunit on local html file
To : netscape.public.mozilla.jseng
From : news4schuster
Date : Mon Feb 07 2005 06:59 am
Hi all,
I need to run httpunit on a html file on my local machine.
When I reference the url path like that "
String filepath = "file://D:\\data\\MyTest\\file.html";
WebConversation wc = new WebConversation();
WebRequest request = new GetMethodWebRequest(filepath);
WebResponse response = wc.getResponse( request );
WebForm form = response.getFormWithName( "testform" );
System.out.println("paramname = " +
form.getParameterValue("paramname"));
" ... I get the following error: "java.net.UnknownHostException: D"
How can I refer to a HTML-file on my local machine with httpunit?
What I'm trying to do is: I need to interpret JavaScript code from a
html-page without a browser. The interpreter should be able to handle
DOM elements like document.forms, window, navigator etc. I want to
change the value of form elements manualy with "form.setParameter(
name , value)" and than call the corresponding JavaScript function
(like onchange etc.) to calculate possible changings of other form
elements.
Is this possible with httpunit?
Thank you for your help.
Matthias
.