Here is an example of a simple JavaScript code that will solve your question: As I understand from our discussion in the chat, you have a structure like this on a third-party site:
<th class="select-all"> <input type="checkbox" class="form-checkbox" title="Отметить все колонки таблицы"> </th>
You need to choose this checkbox :
From the code it is clear that we can select it according to the class of its parent class="select-all" .
And then there are just 3 lines of Javascript code, the first line selects the parent, the second one looks for the checkbox itself that you need, and the third line supplies the птичку (selects your checkbox )
var tmp_th = document.getElementsByClassName('select-all'); var my_checkbox = tmp_th[0].childNodes[1]; my_checkbox.setAttribute("checked", "checked");
If you want to check that you have selected the desired item, just write the following line after the code: console.log(my_checkbox); and you will see the selected item in the console.
type="checkbox"writetype="radio"and you can always choose only one of them. - Raz Galstyan