Q: How to list the checkboxes in selenium? How to list all the checkboxes available in a webpage by displaying their Visible Text in  selenium using Java?

A: For that website this should do
List<WebElement> checkboxes = driver.findElements(By.cssSelector("input[type=checkbox]"));
    JavascriptExecutor js = (JavascriptExecutor) driver;
    if (checkboxes.isEmpty()) {
        System.out.println("No Checkbox present in the page");
    } else {
        for (WebElement checkbox : checkboxes) {
            if (checkbox.isDisplayed()) {
                String text=(String) js.executeScript("return arguments[0].nextSibling.textContent.trim();", checkbox);
                System.out.println(text);
            }
        }
    }

