Hi, We managed to get the following to work for us:
xpath="//input[contains(@name,'tcf_mpf_file_groups') and @value='10137,Streamline,131,1']"/> thanks for all the replies and the help! /Iain... -----Original Message----- From: webtest-ad...@lists.canoo.com [mailto:webtest-ad...@lists.canoo.com] On Behalf Of Michael Habbert Sent: 08 January 2014 17:49 To: webtest@lists.canoo.com Subject: Re: [Webtest] Query on how to select a checkbox Am 08.01.2014 10:24, schrieb Iain Kennelly: > 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 : > > <inputclass="checkbox" type="checkbox" value="10137,Test Group,131,1" > name="tcf_mpf_file_groups_[57]"> > > <span>TestGroup</span> > > <inputclass="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... So is this case we do generate an id like id="checkbox-group-id" to each element of the list. But any way the main focus should be what do you intend to test? Why are the order in the list varies on what reason? cheers Michael Habbert _______________________________________________ WebTest mailing list WebTest@lists.canoo.com http://lists.canoo.com/mailman/listinfo/webtest ---------------------------- 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 ---------------------------- _______________________________________________ WebTest mailing list WebTest@lists.canoo.com http://lists.canoo.com/mailman/listinfo/webtest