I am writing a Tampermonkey script to add more functionality to an existing website and I am trying to click on a button with the following source code:
<label _ngcontent-c10="" ngbbuttonlabel="" class="btn btn-agree ng-star-inserted">
<input _ngcontent-c10="" ngbbutton="" type="radio" value="AGREE" ng-reflect-value="AGREE" name="decision">YES
</label>
The input radio button is hiding behind a parent Label element.
I have tried clicking on the radio button using: radio_element.click()
(where radio_element
is that particular button) but that simply changes the state to active. radio_element.checked = true
does not seem to work either.