From: Rochit Sen Date: 2013-03-24T02:01:33+09:00 Subject: Need to parse a list of checkboxes - ruby mechanize Hi All, I have a ruby mechanize form that has a list of some 45 checkboxes. Now i want to parse that list and then check each checkbox. Any idea how? As i donot want to write a line of code for each checkbox, i would want to parse the checkboxes list. I can get the name of a checkbox using the following code: chkName = checkboxForm.checkbox.name Now how would i parse the whole list to store the names in an array. Once i get those in the array i can use the following code in a for loop to compare the name in the mechanize checkbox_with(:name => 'checkbox_name').check Please let me know what other better approach we can use. regards. -- Posted via http://www.ruby-forum.com/.