// The actual console is in an iframe from a different origin. // Fortunately, they share the same TLD, and the iframe sets document.domain, // so we're able to set ours to the same value. (And we need to.) document.domain = 'console.aws.amazon.com'; // Grab all checkboxes... var spans = document.querySelector('iframe').contentDocument.querySelectorAll('tr.list-view-item[type] span.inner'); // ...and click them all: [].slice.call(spans).forEach(function (span) { span.click(); });