First we need to analyze the page source code. Fortunately, the page call a Javascript function inside a form to apply it, so we can run a Javascript script in Google Chrome Console in Developer mode to apply all the form in this page.
The steps are:
- Get all the forms in the page and parse them to Javascript array.
- Filter out the form that not match your need.
- Finally, loop through the array of forms to apply it.
var htmlForms = document.getElementsByTagName("form");
var tempForms = Array.from(htmlForms);
var forms = tempForms.filter(form => !form.getAttribute('name').includes('searchForm') && !form.getAttribute('name').includes('jre'));
forms.forEach(function (form) {
acceptAgreement(window.self, form.getAttribute('name').replace('agreementForm',''));
});