karl368 / firepath

Automatically exported from code.google.com/p/firepath
GNU General Public License v3.0
0 stars 0 forks source link

No match when using text() function inside predicates #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Trying to match an element using the text() function doesn't work, it 
incorrectly reports that no elements were matched.

What steps will reproduce the problem?
1. Try to match an option element by its text, i'm using the next portion of 
html:

<select name="interfaz.indice">
<option value="9">GRUPOS3</option>
<option value="12">MONICA</option>
<option value="13">RAFA</option>
<option value="14">PRUEB</option>
<option value="15">ARCHIVO</option>
<option value="18">NEUV</option>
<option value="19">NEUV</option>
</select>

2. Use Firepath to match the following expression:

//option[normalize-space(text())="GRUPOS3"]

3. Firepath reports no matching nodes, other xpath tools (firefinder) match for 
the first option node in the group

What is the expected output? What do you see instead?
It should find the matching node, but reports none was found.

What version of the product are you using? On what operating system?
Firepath 0.9.6.1, firefox 4.0.1, windows xp

Please provide any additional information below.

Original issue reported on code.google.com by rafa.sin...@gmail.com on 24 May 2011 at 3:48

GoogleCodeExporter commented 9 years ago
Thanks for reporting this.
This issue is actually caused by the same bug that causes issue 24.
Their is a workaround, if you use single quotes instead of double quotes it 
will work.

So this should find a match:
//option[normalize-space(text())='GRUPOS3']

Original comment by pierre.t...@gmail.com on 24 May 2011 at 4:53