Hey Marc,
don't ask how, but I got it!
[java] DEBUG (com.canoo.webtest.ant.TestStepSequence) - Executing step
ScriptStep at D:\projects\WebtestSI\webtests\test.xml:39: with
(language="javascript", script="
[java] item =
document.getOneHtmlElementByAttribute('input', 'name', 'Pass');
[java] item.keyDown(13);
[java] ", taskName="scriptStep")
[java] [scriptStep] DEBUG (com.canoo.webtest.steps.Step) - Expanding
properties for scriptStep (7/7)
[java] [scriptStep] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
scriptStep (7/7)
[java] [scriptStep] DEBUG (com.canoo.webtest.steps.Step) - Executing
scriptStep (7/7)
[java] [scriptStep] DEBUG (com.canoo.webtest.extension.ScriptStep) - Creating
new Script Runner with language: javascript
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) - BSFManager:declareBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) -
BSFManager:registerBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) - BSFManager:declareBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) -
BSFManager:registerBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) - BSFManager:declareBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) -
BSFManager:registerBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) - BSFManager:declareBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) -
BSFManager:registerBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) - BSFManager:declareBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) -
BSFManager:registerBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) - BSFManager:declareBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) -
BSFManager:registerBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) - BSFManager:declareBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) -
BSFManager:registerBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) - BSFManager:declareBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) -
BSFManager:registerBean
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) - BSFManager:exec
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) -
BSFManager:loadScriptingEngine
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) -
BSFManager:getClassPath
[java] [scriptStep] DEBUG (org.apache.bsf.BSFManager) -
BSFManager:getClassLoader
[java] [scriptStep] DEBUG (com.canoo.webtest.steps.Step) - Finished
scriptStep (7/7)
[java] [scriptStep] DEBUG (com.canoo.webtest.steps.Step) - Completed Step:
scriptStep (7/7)
[java] [scriptStep] DEBUG (com.canoo.webtest.steps.Step) - <<<< Successful
Step: scriptStep (7/7)
[java] DEBUG (com.canoo.webtest.ant.TestStepSequence) - Step execution
finished
But no htmlunit debug messages in there.
Other steps show htmlunit debug messages, so logging seems to work.
-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Zoth, Jochen
Gesendet: Dienstag, 1. August 2006 12:40
An: [EMAIL PROTECTED]
Betreff: AW: AW: AW: [Webtest] submit forms using the enter key
I edited log4j.properties and also tried "-DlogLevel.httpclientWire=debug
-DlogLevel.htmlunit=debug" and still get no debug messages.
Maybe something to do with the problem of the development version showing no
step logging? I'm using R_1368.
So I tried the 2.0 release (R_1217) and got htmlunit logging working!
But with this version the scriptStep doesn't work. I always get:
java.lang.ClassNotFoundException:
org.apache.bsf.engines.javascript.JavaScriptEngine
Is there someone who doesn't want me to get this working? ;-)
-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Marc Guillemot
Gesendet: Dienstag, 1. August 2006 11:56
An: [EMAIL PROTECTED]
Betreff: Re: AW: AW: [Webtest] submit forms using the enter key
WebTest uses log4j. If you uses the classic WebTest classpath, you can
edit log4j.properties in Webtest's lib dir.
Marc.
Zoth, Jochen wrote:
> OK, how do I change the debug level for htmlunit?
> webtest -d shows no htmlunit debug messages...
>
> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Marc Guillemot
> Gesendet: Dienstag, 1. August 2006 11:18
> An: [EMAIL PROTECTED]
> Betreff: Re: AW: [Webtest] submit forms using the enter key
>
> Hi Jochen,
>
> try to set the log level to debug (in particulary for what concerns
> htmlunit) to see what happens.
>
> Marc.
>
> Zoth, Jochen wrote:
>> Hi Marc,
>>
>> Thanks for your suggestion, I tried it on a login form
>>
>> <setInputField name="Pass" value="aaa" />
>> <setInputField name="User" value="bbb" />
>>
>> <scriptStep language="javascript">
>> item = document.getOneHtmlElementByAttribute('input', 'name', 'Pass');
>> item.keyDown(13);
>> </scriptStep>
>>
>> to simulate a user pressing enter after entering username and pass, but
>> nothing happened. The input fields are filled with aaa / bbb and the
>> scriptStep is executed, but it doesn't fire the form.
>>
>> I also tried some key codes of "normal" characters, nothing is entered into
>> the input field.
>>
>> Jochen.
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Marc
>> Guillemot
>> Gesendet: Montag, 31. Juli 2006 15:28
>> An: [EMAIL PROTECTED]
>> Betreff: Re: [Webtest] submit forms using the enter key
>>
>> Hi Jochen,
>>
>> there is currently no WebTest step doing this, but you can use a script
>> for instance Groovy to call directly keyDown on the element you want:
>> http://htmlunit.sourceforge.net/apidocs/com/gargoylesoftware/htmlunit/html/HtmlElement.html#keyDown(int)
>>
>> Marc.
>>
>> Zoth, Jochen wrote:
>>> Hi,
>>>
>>> I'm looking for a way to submit form data like pressing the enter key
>>> after filling an input field, instead of using the <clickButton
>>> value="OK"/> way.
>>>
>>> I need this because of a buggy application behaving different on some
>>> forms submitted by pressing enter, instead of using the submit button.
>>>
>>> Any ideas?
>>>
>>> Jochen.
>>> _______________________________________________
>>> WebTest mailing list
>>> [email protected]
>>> http://lists.canoo.com/mailman/listinfo/webtest
>>>
>> _______________________________________________
>> WebTest mailing list
>> [email protected]
>> http://lists.canoo.com/mailman/listinfo/webtest
>> _______________________________________________
>> WebTest mailing list
>> [email protected]
>> http://lists.canoo.com/mailman/listinfo/webtest
>>
>
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
>
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest