2 messages in com.canoo.lists.webtestRV: [Webtest] Smart setCheckbox
FromSent OnAttachments
Francisco Javier Martin Gutierrez14 Sep 2007 05:33 
Denis N. Antonioli14 Sep 2007 09:46 
Subject:RV: [Webtest] Smart setCheckbox
From:Francisco Javier Martin Gutierrez (fran@thalesgroup.com)
Date:09/14/2007 05:33:21 AM
List:com.canoo.lists.webtest

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)]../input[@type='checkbox'" value="on" />

I am reading more about how to do it but now I need help.

Thanks.

_____

De: Dierk Koenig [mailto:dier@canoo.com] Enviado el: viernes, 14 de septiembre de 2007 14:01 Para: webt@lists.canoo.com; fran@thalesgroup.com 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: webt@lists.canoo.com [mailto:webt@lists.canoo.com]On Behalf Of Francisco Javier Martin Gutierrez Sent: Freitag, 14. September 2007 11:23 To: webt@lists.canoo.com 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="//input[@type='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.

AVISO LEGAL: La informacion contenida en este mensaje y cualquier documento
adjunto en el mismo es confidencial, puede estar legalmente protegida y esta
dirigida solamente al destinatario. La publicacion, uso, distribucion, impresion
o copia no autorizada del contenido de este mensaje, esta estrictamente
prohibida y puede ser ilegal. Si Vd. ha recibido este mensaje por error, le
rogamos destruya el mensaje y lo notifique al remitente o llame al telefono
(+34) 91 556 92 62.