All of this is on one page. A number of excercises revealed one at a time.
As you complete one, it hids it, and shows the next.
The "button" shown for "Check your answer" is not a HTML button.
It's an image with an onclick() method. I want to keep my hands on the keyboard, and I have not found any way via the KB to select and press this "button".
Here's the web page in question:
Here's the screen:
Here's the HTML for this "button" and the
<div> that encloses it:
<!--e00--> <div id="exercise-16-0" class="unhidden"> <p style="margin-top:12px;">This code declares an empty array. Complete it.<br /> <span class="code">var finalScores = ____</span><br /> </p> <label for="input-16-0"> <input id= "input-16-0" type="text" class="codeField" size="57"> <img src="button-check-it.png" class='buttonCheckIt' onmouseover= "src='button-check-it-hover.png';" onmouseout="src='button-check-it.png';" onclick="checkPattern ( /\[\];/,'input-16-0',[16,0] );"> </label> </p> </div>
<div> block is repeated n times for the number of questions on this page.
So, how can I click on the "button" that is visible?
<div> even when it's not visible.
var aButtons = document.getElementsByClassName('buttonCheckIt'); aButtons.click();
I have searched the 'net exhaustively, and can't figure out how to get a ref to the "button" class that is visible.
Can anyone help?