[Webtest] How can i use wt:cleanText

Vikenty Menshutkin VikentyMenshutkin@oilspace.com
Thu, 25 Sep 2008 12:11:42 +0400


You can use XPath normalize-space function
 http://www.w3.org/TR/xpath#function-normalize-space


<verifyXPath xpath="//td[normalize-space(.)='I do not have extra space']" />


On Wed, 2008-09-24 at 12:02 -0500, Soula, William wrote:
> For:
> <table>
>         <td name="td">I have extra space after me
>         </td>
> </table>
> 
> This works:
> <verifyXPath xpath="//table[wt:cleanText(td)='I have an extra space after me']"/>
> 
> The other way to verify text in xpath is to use the text() function but this only works if there is no trailing space so it won't work in the above example but will work in the following example:
> <table>
>         <td name="td">I do not have extra space</td>
> </table>
> 
> <verifyXPath xpath="//table[td/text()='I do not have extra space']"/>
> 
> -----Original Message-----
> From: webtest-admin@lists.canoo.com [mailto:webtest-admin@lists.canoo.com] On Behalf Of dariusch
> Sent: Wednesday, September 24, 2008 10:44 AM
> To: webtest@lists.canoo.com
> Subject: [Webtest] How can i use wt:cleanText
> 
> 
> Hello,
> 
> i can't find this possibility, how can i use it? Maybe you show me an example like this:
> 
> <webtest name="my simple Test">
>       <invoke
>         url="http://www.myserver.com:8080/myApp/login"
>         description="get Login Page" />
> 
>         call "wt:cleanText"
> 
>       <verifyTitle
>         text="Login Page"
>         description="we should see the login title" /> </webtest>
> 
> Cheers,
> Dariusch
> --
> View this message in context: http://www.nabble.com/How-can-i-use-wt%3AcleanText-tp19651744p19651744.html
> Sent from the WebTest mailing list archive at Nabble.com.
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest