unable to check checkbox

58 views
Skip to first unread message

Herman Xiao

unread,
Jul 17, 2021, 11:23:45 PM7/17/21
to Capybara
having trouble to check the checkboxes:

check 'accept_marketing_offer', allow_label_click: true
# check 'I want to receive news, feature updates, discounts, and offers from Termly.', allow_label_click: true

Unable to find visible checkbox "accept_marketing_offer" that is not disabled (Capybara::ElementNotFound)

if I use find(:xpath, '//input[@name="accept_marketing_offer"]').click
Unable to find visible xpath "//input[@name=\"accept_marketing_offer\"]" (Capybara::ElementNotFound)

//input[@name='accept_marketing_offer'] in selectorhub returns one match
<input type="checkbox" name="accept_marketing_offer" value="false" style="" xpath="1">

Thanks,
Herman
Reply all
Reply to author
Forward
0 new messages