I want to make a bookmarklet that click the Id value of a radio button on this page I want it to select - Option 2
I've created a bookmarklet in google chrome and used this code
document.getElementsByClassName('mat-radio-2-input')[1].checked = true
but when I click the bookmark, it does nothing I want it to select "Option 2" elementId.
If you inspect the page you can see that Option 2 has id
mat-radio-3-input, you can use this code to select it via a bookmark: