private final WebElement chkElement;
private Checkbox(WebElement element) {
String tagName = element.getTagName();
if (null == tagName || !"input".equals(tagName.toLowerCase())) {
throw new UnexpectedTagNameException("input", tagName);
}
String type = element.getAttribute("type");
if (type == null || !"checkbox".equals(type.toLowerCase())) {
throw new IllegalArgumentException("element is not a checkbox");