Check all Checkboxes in Page via Developer Tools Check all Checkboxes in Page via Developer Tools google-chrome google-chrome

Check all Checkboxes in Page via Developer Tools


(function() {    var aa= document.getElementsByTagName("input");    for (var i =0; i < aa.length; i++){        if (aa[i].type == 'checkbox')            aa[i].checked = true;    }})()

With up to date browsers can use document.querySelectorAll

(function() {    var aa = document.querySelectorAll("input[type=checkbox]");    for (var i = 0; i < aa.length; i++){        aa[i].checked = true;    }})()


From Console Dev Tools (F12) you can use query selector as you use in javascript or jQuery code.

'$$' - means select all items. If you use '$' instead you will get only first item.

So in order to select all checkboxes you can do following

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

or

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


To modify the accepted answer slightly, if you're trying to check all of the boxes on some services, such as Loom.com, then you'll need to click each one instead of just setting them to "checked" status, otherwise the functionality doesn't work as expected.

Here's the code to do that:

(function() {    var aa = document.querySelectorAll("input[type=checkbox]");    for (var i = 0; i < aa.length; i++){        aa[i].click();    }})()

Please note that longer lists of checkboxes will cause the page to pause temporarily as all checkboxes get automatically clicked for you.