alibaba82
17 years agoSuper Contributor
count nodes in http test step
Hello,
I have a http test request (look at response below). I am trying to count certain nodes in it using this code
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( "HTTP Test Request#Response" )
def cnt = holder["count(//html/body/pre/a)"]
but I get this error
Tue Feb 03 09:27:54 PST 2009:ERROR:An error occured [error: does not close tag <meta />.], see error log for details
If I create a count assertion using soapui (using same xpath) count assertion, I get no error.
HTTP Response:
<meta content="HTML Tidy, see <!-- w --><a class=" postlink="" />www.w3.org" name="generator"/>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
cswebdev.tvguide.com - /epgrepository/01272009/3/6/4/7/9/7/1/
I have a http test request (look at response below). I am trying to count certain nodes in it using this code
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( "HTTP Test Request#Response" )
def cnt = holder["count(//html/body/pre/a)"]
but I get this error
Tue Feb 03 09:27:54 PST 2009:ERROR:An error occured [error: does not close tag <meta />.], see error log for details
If I create a count assertion using soapui (using same xpath) count assertion, I get no error.
HTTP Response:
<meta content="HTML Tidy, see <!-- w --><a class=" postlink="" />www.w3.org" name="generator"/>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
cswebdev.tvguide.com - /epgrepository/01272009/3/6/4/7/9/7/1/
[To Parent Directory]
Tuesday, January 27, 2009 2:51 PM 3915190
01272009.xml
Tuesday, January 27, 2009 2:51 PM 3930203
01282009.xml
Tuesday, January 27, 2009 2:51 PM 3854195
01292009.xml
Tuesday, January 27, 2009 2:51 PM 3711219
01302009.xml
Tuesday, January 27, 2009 2:51 PM 3552237
01312009.xml
Tuesday, January 27, 2009 2:51 PM 3666199
02012009.xml
Tuesday, January 27, 2009 2:50 PM 3837871
02022009.xml
Tuesday, January 27, 2009 2:50 PM 3753802
02032009.xml
Tuesday, January 27, 2009 2:50 PM 3718255
02042009.xml
Tuesday, January 27, 2009 2:50 PM 3659345
02052009.xml
Tuesday, January 27, 2009 2:50 PM 3430281
02062009.xml
Tuesday, January 27, 2009 2:50 PM 3208006
02072009.xml
Tuesday, January 27, 2009 2:50 PM 3246209
02082009.xml
Tuesday, January 27, 2009 2:51 PM 3311282
02092009.xml