Hi, Thanks for the reply.
But we would need to select based on either the number or the name. i.e. 57 is different to 58 Our html would be : <input class="checkbox" type="checkbox" value="10137,Test Group,131,1" name="tcf_mpf_file_groups_[57]"> <span>TestGroup</span> <input class="checkbox" type="checkbox" value="10138,Test Group2,132,1" name="tcf_mpf_file_groups_[58]"> <span>TestGroup2</span> So how can we select either of these without using the name? thanks, /Iain... From: [email protected] [mailto:[email protected]] On Behalf Of Marlon Palo Sent: 08 January 2014 00:40 To: [email protected] Subject: RE: [Webtest] Query on how to select a checkbox Try using xpath instead of name in the setCheckbox attribute example: xpath=//input[contains(@name,'tcf_mpf_file_groups')] Cheers! ________________________________ From: [email protected]<mailto:[email protected]> To: [email protected]<mailto:[email protected]> Subject: [Webtest] Query on how to select a checkbox Date: Tue, 7 Jan 2014 17:27:16 +0000 Hi, Within 1 of our tests we select a checkbox based on the id. However if the id's change our tests are breaking and we find that it takes a while to fix the tests. The HTML we have is: HTML: <input class="checkbox" type="checkbox" value="10137,Test Group,131,1" name="tcf_mpf_file_groups_[57]"> <span>TestGroup</span> The Webtest command we use is: <setCheckbox name="tcf_mpf_file_groups_[57]"/> Is there anything else we can use to set the checkbox so that we would not be dependent on the name? Our issue is that the name i.e. tcf_mpf_file_groups_[57] can sometime change to be tcf_mpf_file_groups_[58], thus causing our test to fail. thanks in advance, /Iain... Iain Kennelly Backoffice QA Team Lead FEXCO Merchant Services FEXCO Centre Iveragh Road Killorglin Co. Kerry Ireland T: + 353 66 9761258 Ext. 2394 WWW.FEXCOMS.COM<http://www.fexcoms.com/> ---------------------------- E-mail disclaimer FEXCO Merchant Services, registered in Ireland, No. 246289. Registered Office: FEXCO Centre, Iveragh Road, Killorglin, Co. Kerry, IRELAND. This message, including any attachments, is confidential. If you are not the named recipient, please contact the sender and delete the email from your system ----------------------------

