I am trying to build a program to automate clicking on the correct multiple choice answer from a set of radio buttons but I am having trouble. The only difference in the HTML is “explanation correct” and “explanation incorrect” on the highlighted line’s class based on if the correct radio button is clicked. Why won’t my JavaScript code work?
Above is the HTML that I am working with and below is the JavaScript code I have written to try and select the correct radio button. Any idea why it’s not working?