Quick hint:
the xpath function text() doesn't take an argument.
It should be:
td[text()='Desajustes convivienciales por ser soltera gestante']
Happy testing!
dna
On 14 sept. 07, at 14:33, Francisco Javier Martin Gutierrez wrote:
Hello:
Sorry about the xpath example but the source code is true. I want
to reach the input checkbox element which is inside the td element,
not other. Sometimes input checkbox change from
<td class="valorCeldaListado"><input type="checkbox"
name="valoracion[2].checkeado" value="on" style="{border : 0}"></td>
to
<td class="valorCeldaListado"><input type="checkbox"
name="valoracion[1].checkeado" value="on" style="{border : 0}"></td>
It is obvious that I have not enough acknowledgment about XPath
syntax. I have tried also
<setCheckbox description=" Desajustes convivienciales por ser
soltera gestante"
xpath="//tr/td[text(Desajustes convivienciales por ser soltera
gestante)]../[EMAIL PROTECTED]'checkbox'" value="on" />
I am reading more about how to do it but now I need help.
Thanks.
De: Dierk Koenig [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 14 de septiembre de 2007 14:01
Para: [email protected]; [EMAIL PROTECTED]
Asunto: RE: [Webtest] Smart setCheckbox
your xpath has to resolve to a checkbox, i.e. the 'input' element
not the td.
Do you really have a td inside 'input'?
ciao
Dierk
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:webtest-
[EMAIL PROTECTED] Behalf Of Francisco Javier Martin Gutierrez
Sent: Freitag, 14. September 2007 11:23
To: [email protected]
Subject: [Webtest] Smart setCheckbox
Hello:
I have read at Marc`s blob how to do an elegant correct xpath
selection. Please, can anybody revise this code and tell me how to
check this ckeckbox using xpath? The checkbox number [2] sometimes
changes so I need to do it in other way. I have tried this:
<setCheckbox description=" Desajustes convivienciales por ser
soltera gestante"
xpath="//[EMAIL PROTECTED]'checkbox']/td[text(Desajustes convivienciales
por ser soltera gestante)]" value="on" />
Source code is:
<tr>
<td class="valorCeldaListado"><input
type="checkbox" name="valoracion[2].checkeado" value="on"
style="{border : 0}"></td>
<td class="valorCeldaListado">2</td>
<td class="valorCeldaListado">Desajustes
convivienciales por ser soltera gestante</td>
<td class="valorCeldaListado">PRUEBAPC002
AUTOMATICA A000152</td>
<td class="valorCeldaListado">14/09/2007</td>
</tr>
Thank you.
--
Did you read the documentation ? Even a little ? You're expected to
do that, really. It won't bite you.
-- Ollivier Robert