[Webtest] Javascript method "focus" causing problems
Marc Guillemot
webtest@lists.canoo.com
Tue, 11 Oct 2005 09:20:56 +0200
Hi,
it seems that htmlunit isn't able to resolve "document.frm.email". It
may be due to incorrect html code... or to a problem in htmlunit. If
your html is well formed, try to reduce your page to the minimal code
producing the error and open a bug issue by htmlunit.
Marc.
Joshua wrote:
> Greetings,
>
> I am running a clickLink step that fails. This seems
> to be a result of the javascript focus method. The
> error that I receive is as follows:
>
> [testSpec] INFO (com.canoo.webtest.steps.Step) -
> Start Step: verifyText "Check to see Owner Login in
> the breadcrumb (Owner Login)" (7/13)
> [testSpec] INFO (com.canoo.webtest.steps.Step) -
> Start Step: clickLink "Select the Forgot your Password
> hyperlink" (8/13)
> [testSpec] ERROR
> (com.canoo.webtest.steps.request.Target) -
> ScriptException: enclosed exception was "TypeError:
> Cannot call method "focus" of undefined (event for
> HtmlBody[<body onload="document.frm.email.focus( )"
> topmargin="0" leftmargin="0">]#1)"
> [testSpec] INFO (com.canoo.webtest.steps.Step) -
> Exception thrown from this class:
> com.canoo.webtest.engine.StepFailedException
> [testSpec] INFO (com.canoo.webtest.steps.Step) -
> Message was: Step[clickLink "Select the Forgot your
> Password hyperlink" (8/13)]: Script error executing
> at: link href=forgot.php
>
> BUILD FAILED
> /Users/joshuastinson/Sites/quickthunder/pvh/head/test/webtest/oldsite/owner/login/successful-login-testcases.xml:15:
> The following error occurred while executing this
> line:
> Test step clickLink
> (/Users/joshuastinson/Sites/quickthunder/pvh/head/test/webtest/oldsite/owner/login/uc-retrievepassword-successful.xml:7:
> ) named "Select the Forgot your Password hyperlink"
> failed with message "Step[clickLink "Select the Forgot
> your Password hyperlink" (8/13)]: Script error
> executing at: link href=forgot.php"
>
> Anyone else experienced problems with javascript focus
> methods? Anyone have a fix for this?
>
> Thanks,
>
> Joshua
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>