← Back to Discord Forum

Checking box not working

ayyoub_63450posted in #help-playwright
Open in Discord

i have try check() action and click() action but no results

This thread is trying to answer question "Why are the check() and click() actions not working on a checkbox element, and how can this issue be resolved?"

2 replies

this is my element : <input type="checkbox" data-cy="accept-privacy" id="AcceptPrivacyPolicy" name="RegistrationForm_AcceptPrivacyPolicy" value="1" data-fv-required="true" data-fv="" data-field-inited="true">

looks like there's a span intercepting the event. You can fix that, or use click({force: true}).

Related Discord Threads

AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.