Excellent!
There is a lot happening here. I can see your checkboxes are part of a table and there are IDs that you can work with.
The easiest way to try and access the checkbox by its ID.
I can see that the ID of the checkbox that is checked is called question-0. I'm guessing that the next checkbox is called question-1 and so on.
Therefore you can locate and check the checkbox based on it ID with driver.findElement(By.Id("question-0")).click();
Now this is where it get tricky. Looking at the DOM, I can't tell if that checkbox is checked or not. So clicking on the element might be unchecking the checkbox. I would recommend asking the Developers how you can tell from the DOM if the checkbox is checked or not. They might have to add extra information in the DOM for you to know this.
If searching for the checkbox by ID doesn't work there are other ways.
You can find all the inputs with the type checkbox and then iterate through the results for the required ID or text that matches the checkbox label.
C#
var allCheckboxes = driver.findElements(By.cssSelector("input[type='checkbox']"))
foreach (checkbox in allCheckboxes)
{
checkbox.Click()
}
Or you could try:
var allCheckboxes = driver.findElements(By.cssSelector("input[type='checkbox']"))
foreach (checkbox in allCheckboxes)
{
if (checkbox.Text == "How do I contact you?")
checkbox.Click()
}
Or there are potentially other ways to get this info via the class name.
Goodluck,
Adrian.