Try using xpath instead of name in the setCheckbox attribute example: xpath=//input[contains(@name,'tcf_mpf_file_groups')]
Cheers! From: ikenne...@fexco.com To: webtest@lists.canoo.com 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 ---------------------------- 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 ----------------------------