cancel
Showing results for 
Search instead for 
Did you mean: 

log message

Highlighted
Occasional Contributor

log message

hi all,

i have just created a groovy script and i want to see the value for that.
how to read the value resulting from log information.

i have used,
def items = holder.getNodeValues( "//clientSession::*")
for (item in items)
{
log.info( item )
}

where to view the log info that holds the item value. i need to get the values of clientSession node and also suggest me that the above code snippet is correct?

thanks
ind


thanks
1 REPLY 1
Highlighted
Super Contributor

Hi!

looks correct to me, but maybe you need to adjust the xpath to be

"//clientSession/text()" ?

the log.info( .. ) writes to the groovy log tab at the bottom of the soapUI window.. you could also add a

log.info( "Found " + items.length + " items.." )

before the for-loop, so your whole script would be

def items = holder.getNodeValues( "//clientSession/text()")
log.info( "Found " + items.length + " items.." )
for (item in items)
{
log.info( item )
}


Hope this helps!

/Ole
eviware.com
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors