4 messages in com.canoo.lists.webtestRe: [Webtest] Problem make storexpath...
FromSent OnAttachments
Koorosh Vakhshoori14 Jan 2005 19:02 
Marc Guillemot17 Jan 2005 00:07 
Koorosh Vakhshoori27 Jan 2005 17:47 
Marc Guillemot28 Jan 2005 00:18 
Subject:Re: [Webtest] Problem make storexpath working under htmlunit.
From:Koorosh Vakhshoori (Koor@synopsys.com)
Date:01/27/2005 05:47:31 PM
List:com.canoo.lists.webtest

Hi,

It turns out the problem in this case had to do with htmlunit reading a file with content type set to 'text/html' by default, while here it was not true, it should have set the content to 'text/xml'. I did a hack in file WebClient.java in method makeWebResponseForFileUrl(). In short in case of a file URL, I changed the code so if it does not see an <html> tag in it, then it is XML, it is a hack I know, but it works for me.

Take care, Koorosh

At 09:07 AM 1/17/2005 +0100, you wrote:

I think that it is related to following bug in Jaxen (which is used for xpath evaluation): http://jira.codehaus.org/browse/JAXEN-55

Marc.

Koorosh Vakhshoori wrote:

Hi guys, I am running out of ideas. I have following XML file that I feed into Webtest to read via storexpath. This file was generated at an earlier set in testing my application. <?xml version='1.0' encoding='UTF-8'?> <dataset> <table name="USERACCOUNTPROFILE"> <column>TMPUSERID</column> <row> <value>116517</value> </row> </table> </dataset> When I use following <storexpath> tag it works: <storexpath xpath="//row/value[1]" property="key" /> It sets dynamic property key=116517. However, when I try the following it does not: <storexpath xpath="/dataset/table/row/value[1]" property="key" /> This used to work before the change over to htmlunit. Any idea what could be wrong here? I looked at the storexpath code, looking for debug flags could not find anything useful. Any suggestions on how to debug this problem? Thanks for all the help before hand. Koorosh