<tr style="color:#333333;"> <td> <input name="#ctl00$bc$custom$element$43$0" type="checkbox" id="#ctl00_bc_custom_element_43_0" onclick="CheckChanged();"> </td> <td>Garage</td> <td> <b>15:00 - Wed,19 Mar, 2018</b> </td> </tr>
As you see the checkbox has an Id but the date is a simple bolded text. This is from a website that I have no control over the source code. It’s just loaded into my browser. So I can’t edit it.
By running the following code in FireFox console:
document.getElementById('#ctl00_bc_custom_element_43_0').checked = true;
I can tick the checkbox. But I want to tick that checkbox by using the date (text) in front of it. Unfortunately the text has no Id.
document.getElementById('15:00 - Wed,19 Mar, 2018').checked = true;
I have used different firefox plugins for the purpose of ticking the checkbox, bus since the checkbox and date (text) are in different
<td> I get nothing.