Hello,
this doesn't seem to work in my webtest. Firebug also returns no matching nodes 
with this xpath.
My search continues for the non-breaking space issue. Here's a new result:
 




expected value
. . . . AML - IUP

actual value
. . . . AML - IUP




expected value
. . . . AML - IUP

actual value
. . . . AML - IUP




expected value
. . . . AML - IUP

actual value
. . . . AML - IUP




expected value
. . . . AML - IUP

actual value
. . . . AML - IUP




expected value
. . . . AML - IUP

actual value
. . . . AML - IUP




expected value
. . . . AML - IUP

actual value
. . . . AML - IUP




expected value
. . . . AML - IUP

actual value
. . . . AML - IUP




expected value
. . . . AML - IUP

actual value
. . . . AML - IUP




expected value
. . . . AML - IUP

actual value
. . . . AML - IUP
expected value: . . . . AML - IUP
actual value: . . . . AML - IUP
 
And this is rather important as the dots in front of the acronyms actually tell 
me what level this item is in the hierarchy (no dots= top level, 2 dots = level 
1, 4 dots = level 2 etc.).
 
Gert
 



From: david_jeh...@ravago.com
To: webtest@lists.canoo.com; postino2...@hotmail.com
Subject: RE: [Webtest] Non-breaking spaces
Date: Thu, 6 Dec 2012 12:04:10 +0100





    <verifyXPath 
xpath=("html/body/table/tbody/tr[3]/td)[normalize-space(text()) = '. . AML' and 
position()=1]" />
 


From: webtest-ad...@lists.canoo.com [mailto:webtest-ad...@lists.canoo.com] On 
Behalf Of Gert Pauwels
Sent: donderdag 6 december 2012 11:54
To: webtest@lists.canoo.com
Subject: [Webtest] Non-breaking spaces
Importance: High
 

Hi all,
 
Returned to using Canoo after a year or so and I’m struggling a bit with a 
webtest on a page that contains non-breaking spaces.
Here’s what I do in the webtest:
 
<verifyXPath xpath="html/body/table/tbody/tr[4]/td[1]" 
text=".&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;AML - IUP"/>
 
The actual html page I’m testing displays the text as follows: 
 
. . . . AML – IUP
 
But if you look in the page source, this is what you get:
 
.&nbsp;.&nbsp;.&nbsp;.&nbsp;AML - IUP
 
Knowing that my webtest would fail on the ‘&’ symbol, I tried escaping that in 
the XPath verification. But this still keeps failing. 
 
Using canoo 3.0, htmlunit 2.9. Also tried reverting back to htmlunit 2.4, to no 
avail.
 
Another question, also related to the above: 
 
    <verifyXPath xpath="html/body/table/tbody/tr[3]/td[normalize-space(text()) 
= '. . AML']" />
In an attempt to resolve the non-breaking space issue, Itried to use the 
normalize space function. The problem here is that canoo does not find the node 
I'm doing it on. I need it to be tthe first TD within the 3rd table row, but I 
don't know how to indicate the TD number and use the normalize space function 
AT THE SAME TIME. Even if this function is not the solution to my nbsp issue, 
I'm still curious to find out how I can do the 2 things in parallel (indication 
which node and use a function at the same time).
 
Any ideas?
Gert                                      

Reply via email to