Rayrun
← Back to Discord Forum

Checking box not working

ayyoub_63450posted in #help-playwright
Open in Discord
ayyoub_63450
ayyoub_63450

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
ayyoub_63450
ayyoub_63450

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

TwitterGitHubLinkedIn
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 [email protected].