Thanks. Now I can "see" ;-)

I found out some interesting things. One is that YUI needs a useragent != 
"MSIE" to run with HtmlUnit/WebTest. Gecko, Opera and even Safari work.

Here the relevant log-snippet of clicking the YUI-Button:

[clickButton] DEBUG (com.canoo.webtest.reporting.StepExecutionListener) - 
isToIgnore: [EMAIL PROTECTED], test
[clickButton] DEBUG (com.canoo.webtest.reporting.StepResult) - In 
retrieveNestedText
[clickButton] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
clickButton (1/1)
[clickButton] DEBUG (com.canoo.webtest.steps.Step) - Executing clickButton (1/1)
[clickButton] INFO (com.canoo.webtest.steps.request.AbstractTargetAction) - -> 
gotoTarget by clickButton with name: null
[clickButton] DEBUG (com.canoo.webtest.steps.request.AbstractIdOrLabelTarget) - 
Looking for html element with xpath: //button
[clickButton] DEBUG (com.canoo.webtest.steps.request.AbstractIdOrLabelTarget) - 
XPath evaluates to: HtmlButton[<button type="button" class="default">]
[clickButton] DEBUG (com.canoo.webtest.steps.request.ClickButton) - It's a 
button, that's ok
[clickButton] DEBUG (com.canoo.webtest.steps.request.ClickButton) - Button 
passes test with label and name
[clickButton] INFO (com.canoo.webtest.steps.request.ClickButton) - -> 
findTarget(by button): name= value=
[clickButton] DEBUG (com.canoo.webtest.steps.Step) - Finished clickButton (1/1)
[clickButton] DEBUG (com.canoo.webtest.steps.Step) - Completed Step: 
clickButton (1/1)
[clickButton] DEBUG (com.canoo.webtest.steps.AbstractBrowserAction) - Current 
response didn't change during step execution
[clickButton] DEBUG (com.canoo.webtest.steps.Step) - Step didn't produce 
results, no need to notifying listeners
[clickButton] DEBUG (com.canoo.webtest.steps.Step) - <<<< Successful Step: 
clickButton (1/1)

I verified that javascript isn't executed by webtest. I debuged into 

com.gargoylesoftware.htmlunit.html.HtmlButton(com.gargoylesoftware.htmlunit.html.ClickableElement).click()
 line: 95

"        final Function function = getEventHandler("onclick");"

Here "function" is null in webtest whereas in HtmlUnit it is notnull.

Is it possible to activate JavaScript evaluation in this scenario?

Cheers,
Christoph


-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Marc Guillemot
Gesendet: Freitag, 17. August 2007 09:26
An: [email protected]
Betreff: Re: [Webtest] YUI-Form and ClickButton / ClickElement

[EMAIL PROTECTED] wrote:
>> ...
>> is it possible that webtest clicks the right button, performs the right 
>> request, but fails to set the right page as the new current response? (you 
>> can configure the logs to > "see" more)
> 
> that is what I assume too. I didn't manage to get more detailed log info than 
> in the produced report (altering log4j.properties had no effect). The report 
> itself does not show a recorded page after the click.

I guess that $WEBTEST_HOME/lib is not in your classpath and therefore
the content of $WEBTEST_HOME/lib/log4j.properties is not considered.

The best way to handle this is to use $WEBTEST_HOME/webtest.xml

Marc.
-- 
Blog: http://mguillem.wordpress.com

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

Reply via email to