0
페이지 객체 젬을 사용하여 ID로 정의 된 체크 박스 목록이 있습니다. 샘플은 다음과 같습니다.페이지 객체를 사용하여 일련의 체크 박스를 반복하는 방법은 무엇입니까?
checkbox :main_product, id: '19437578_58659806'
checkbox :thumb_one, id: '19437579_58659811'
checkbox :thumb_two, id: '19437580_58659812'
checkbox :thumb_three, id: '19437581_58659813'
checkbox :thumb_four, id: '19437582_58659814'
checkbox :thumb_five, id: '19437583_58659815'
checkbox :thumb_six, id: '19437584_58659816'
checkbox :thumb_seven, id: '19437585_58659817'
checkbox :thumb_eight, id: '19437586_58659818'
checkbox :thumb_nine, id: '19437587_58659819'
checkbox :thumb_ten, id: '19437588_58659820'
checkbox :tt_one, id: '19437594_58659842'
checkbox :tt_two, id: '19437595_58659843'
checkbox :tt_three, id: '19437596_58659844'
checkbox :tt_four, id: '19437597_58659845'
checkbox :tt_five, id: '19437598_58659846'
checkbox :tt_six, id: '19437599_58659847'
checkbox :tt_seven, id: '19437600_58659848'
checkbox :tt_eight, id: '19437601_58659849'
checkbox :tt_nine, id: '19437602_58659850'
checkbox :tt_ten, id: '19437603_58659851'
나는 그것을 본다. 특정 div 안에있는 모든 체크 박스 요소를 모으는보다 효율적인 방법이 있어야합니다. 내가 방법을 찾고 있어요
은 본질적으로
checkbox_objects.each do |checkbox|
checkbox.check
end
을 할 수 그러나 나는
checkbox_objects
를 정의하는 방법을 모르겠어요. 특정 요소 안에있는 모든 확인란을 모아서 배열에 넣을 수있는 방법을 아는 사람이 있습니까? 미리 감사드립니다.