Httpunit error while running javascript on orkut

"Thiago Addvico" <[email protected]>
Newsgroups gmane.comp.web.httpunit.devel
Message-ID <[email protected]>
Hello folks,

I was trying to use Httpunit to log into my orkut profile. But then ocurred
a error. Here is the source code and the stack trace of the error. Sorry if
this is a lame question, but I'm unexperienced on web programming and
alikes, and i'm totally lost on what I can do. Thanks for the attention ;-)

----------------------------------
import junit.framework.TestSuite;

import java.io.IOException;
import com.meterware.httpunit.*;

public class Main {

    public static void main(String[] args) {
        WebResponse resp = null;
        WebConversation wc = new WebConversation();
        WebRequest     req = new GetMethodWebRequest( "
https://www.google.com/accounts/ServiceLoginBox?service=orkut&nui=2&skipll=true&skipvpage=true&continue=https%3A%2F%2Fwww.orkut.com%2FRedirLogin.aspx%3Fmsg%3D0%26page%3Dhttp%253A%252F%252Fwww.orkut.com%252F&followup=https%3A%2F%2Fwww.orkut.com%2FGLogin.aspx&hl=pt-BR"
);
        WebForm form = null;
        try {
            resp = wc.getResponse( req );
            form = resp.getForms()[0];
        form.setParameter("Email", "[email protected]");
        form.setParameter("Passwd", "***");
                    form.submit();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
---------------------------------------
Error:
--------------------------------------
java.lang.RuntimeException: No such property: defaultvalue
        at com.meterware.httpunit.scripting.ScriptableDelegate.set(
ScriptableDelegate.java:99)
        at com.meterware.httpunit.FormControl$Scriptable.set(
FormControl.java:391)
        at com.meterware.httpunit.TextFormControl$Scriptable.set(
FormControl.java:793)
        at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.put
(JavaScript.java:275)
        at org.mozilla.javascript.ScriptableObject.putProperty(
ScriptableObject.java:1476)
        at org.mozilla.javascript.ScriptRuntime.setProp(ScriptRuntime.java
:842)
        at org.mozilla.javascript.Interpreter.interpret(Interpreter.java
:2046)
        at org.mozilla.javascript.Interpreter.interpret(Interpreter.java
:2163)
        at org.mozilla.javascript.InterpretedFunction.call(
InterpretedFunction.java:58)
        at
com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(
JavaScript.java:172)
        at com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(
ScriptableDelegate.java:56)
        at com.meterware.httpunit.WebResponse$Scriptable.load(
WebResponse.java:689)
        at com.meterware.httpunit.javascript.JavaScript.load(JavaScript.java
:89)
        at com.meterware.httpunit.javascript.JavaScriptEngineFactory.load(
JavaScriptEngineFactory.java:58)
        at com.meterware.httpunit.RequestContext.runScripts(
RequestContext.java:44)
        at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:122)
        at com.meterware.httpunit.WebWindow.sendRequest(WebWindow.java:110)
        at com.meterware.httpunit.WebRequestSource.submitRequest(
WebRequestSource.java:253)
        at com.meterware.httpunit.WebRequestSource.submitRequest(
WebRequestSource.java:232)
        at com.meterware.httpunit.WebForm.submitRequest(WebForm.java:96)
        at com.meterware.httpunit.WebForm.doFormSubmit(WebForm.java:107)
        at com.meterware.httpunit.WebForm.submit(WebForm.java:69)
        at com.meterware.httpunit.WebForm.submit(WebForm.java:58)
        at Main.main(Main.java:36)
java.lang.RuntimeException: Event 'insertLoadingMessage();redirect();'
failed: java.lang.RuntimeException: No such property: defaultvalue
        at
com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.handleScriptException
(JavaScript.java:199)
        at
com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(
JavaScript.java:175)
        at com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(
ScriptableDelegate.java:56)
        at com.meterware.httpunit.WebResponse$Scriptable.load(
WebResponse.java:689)
        at com.meterware.httpunit.javascript.JavaScript.load(JavaScript.java
:89)
        at com.meterware.httpunit.javascript.JavaScriptEngineFactory.load(
JavaScriptEngineFactory.java:58)
        at com.meterware.httpunit.RequestContext.runScripts(
RequestContext.java:44)
        at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:122)
        at com.meterware.httpunit.WebWindow.sendRequest(WebWindow.java:110)
        at com.meterware.httpunit.WebRequestSource.submitRequest(
WebRequestSource.java:253)
        at com.meterware.httpunit.WebRequestSource.submitRequest(
WebRequestSource.java:232)
        at com.meterware.httpunit.WebForm.submitRequest(WebForm.java:96)
        at com.meterware.httpunit.WebForm.doFormSubmit(WebForm.java:107)
        at com.meterware.httpunit.WebForm.submit(WebForm.java:69)
        at com.meterware.httpunit.WebForm.submit(WebForm.java:58)
        at Main.main(Main.java:36)
-----------------------------------------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Httpunit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/httpunit-develop
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.