Hi Craig,

I don't think that the "_" are the issue or at least not alone: a simple
test with a form named "cpi_card_details" worked like a charm.

Can you provide the smallest test where htmlunit fails?

Marc.

Craig Copeland wrote:
> *//*
> 
> Very quick response. Thanks!
> The HTML is corerct and CardName is a field on the cpi_card_details
> form.  I enabled debug, and ran, and was still a bit uncertain.  So I
> copied the HTML generated and removed 1 piece of JS at a time.  And,
> yes, it's the document.cpi_card_details.CardName.focus() that is the
> problem.  However, it appears that replacing forms[0] allows the JS to
> load appropriately.  Then, I renamed the form to cpicarddetails and
> tried again with the original JS.  It worked.  My conclusion is that
> htmlunit doesn't like _ chars as part of form names, although after
> playing with the field names, htmlunit doesn't mind if those contain _.
> 
>     I guess that the problem doesn't come from "self.focus()" but from
>     document.cpi_card_details.CardName.focus()". Have you the
>     possibility to change your code to check this? Is your html correct?
>     What is "cpi_card_details"? The name of a form? Does this form
>     really contain a field with name "CardName"?
> 
>     You can set the log level to debug to get more information on what
>     is done during js evaluation by htmlunit.
> 
> ------------------------------------------------------------------------
> Yahoo! Autos <http://us.rd.yahoo.com/evt=38381/
> ylc=X3oDMTEzcGlrdGY5BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDMWF1dG9z/*http://autos.yahoo.com/index.html
>>. Looking for a sweet ride? Get pricing, reviews, & more on new and
> used cars.


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to