Select All checkbox by Javascript or console

后端 未结 9 1287
野性不改
野性不改 2021-01-31 05:01

I am having 100 Checkboxes on my web page. For testing purposes I want to tick all those boxes, but manually clicking is time consuming. Is there a possible way to get them tick

9条回答
  •  后悔当初
    2021-01-31 05:27

    I provided answer to this question at Check all Checkboxes in Page via Developer Tools

    In short you can do it from dev tools console (F12) by:

    $$('input').map(i => i.checked = true)

    or

    $$('input[type="checkbox"').map(i => i.checked = true)

提交回复
热议问题