I’m trying to check a checkbox in my cucumber test, but I cannot figure out how to tell it to search by anything other than the id, name, or label. I keep on getting this error:
cannot check field, no checkbox with id, name, or label 'xxxx' found
I have added an attribute of ‘identifier’ to each checkbox, with unique values, and would like to find the box by these terms.
Do you mean that you’ve added a new attribute named
identifierto each checkbox? If so then you may be able to find them using a CSS locator:find(:css, "[identifier='#{my_checkbox_identifier}']").set(true)(
set-ing the checkbox totruechecks it, usefalseto uncheck it.)