This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the testing category.
Last Updated: 2024-11-21
I could not get a Selenium browser test that checked a check box to work.
The trick, in the end was adding allow_label_click
check 'toggle_tutor_visibility', allow_label_click: true
This is needed because, due to custom CSS styling, often the checkbox element itself is invisible and only the label is visible. If the element is invisible, it cannot normally be operated by Selenium. Therefore we allow a substitution of clicking on the label.