When you do println table_cells, you call implicitely the toString() of
each node whereas the asText() method would probably deliver what you
expect:
table_cells.each { println it.asText() }
Otherwise, you can probably use an XPath like //[EMAIL PROTECTED] =
'TblTdLyt']//span/text()
Marc.
Chang Su wrote:
Hi,
I have part of my html file looks like this,
<td id="form2:table1:row0:0:col0" class="TblTdLyt"
align="left"><span
id="form2:table1:row0:0:col0:_id13">Hello</span></td>
How do I get the "Hello" part?
I tried to use
doc.getHtmlElementsByAttribute('td',
'class', 'TblTdLyt').each{
def table_cells =
it.getHtmlElementsByTagName('span')
println (table_cells)
}
it prints span id="form2:table1:row0:0:col1:_id14 but
NOT "Hello"
thanks,
Chang
____________________________________________________________________________________
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest